Browse Source

feat: update first workflows

Ahmad Kholid 2 years ago
parent
commit
e8a5f64d93
1 changed files with 961 additions and 0 deletions
  1. 961 0
      src/utils/firstWorkflows.js

+ 961 - 0
src/utils/firstWorkflows.js

@@ -875,4 +875,965 @@ export default [
       zoom: 0.5,
     },
   },
+  {
+    id: nanoid(),
+    name: 'Search in ProductHunt',
+    createdAt: Date.now(),
+    icon: 'https://res.cloudinary.com/chat-story/image/upload/v1648549611/61f54ef11c566274507d4070_Product_Hunt_j4hpfe.svg',
+    drawflow: {
+      nodes: [
+        {
+          type: 'BlockBasic',
+          dimensions: {
+            width: 192,
+            height: 72,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: 'MeMnYgI8DFrfORUfmREmq-output-1',
+                position: 'right',
+                x: 196.00003756009605,
+                y: 28.000018780048062,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          computedPosition: {
+            x: 96,
+            y: 36,
+            z: 0,
+          },
+          position: {
+            x: 96,
+            y: 36,
+          },
+          id: 'MeMnYgI8DFrfORUfmREmq',
+          label: 'trigger',
+          data: {
+            disableBlock: false,
+            description: '',
+            type: 'context-menu',
+            interval: 60,
+            delay: 5,
+            date: '',
+            time: '00:00',
+            url: '',
+            shortcut: '',
+            activeInInput: false,
+            isUrlRegex: false,
+            days: [],
+            contextMenuName: 'Search in ProductHunt',
+            contextTypes: ['selection'],
+            parameters: [],
+            observeElement: {
+              selector: '',
+              baseSelector: '',
+              matchPattern: '',
+              targetOptions: {
+                subtree: false,
+                childList: true,
+                attributes: false,
+                attributeFilter: [],
+                characterData: false,
+              },
+              baseElOptions: {
+                subtree: false,
+                childList: true,
+                attributes: false,
+                attributeFilter: [],
+                characterData: false,
+              },
+            },
+          },
+          selected: false,
+        },
+        {
+          type: 'BlockBasic',
+          dimensions: {
+            width: 192,
+            height: 72,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: 'pdeg5g8-output-1',
+                position: 'right',
+                x: 196.00003756009605,
+                y: 28.000018780048062,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'pdeg5g8-input-1',
+                position: 'left',
+                x: -19.99999999999999,
+                y: 28.000018780048062,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          computedPosition: {
+            x: 388,
+            y: 36,
+            z: 0,
+          },
+          position: {
+            x: 388,
+            y: 36,
+          },
+          label: 'new-tab',
+          data: {
+            disableBlock: false,
+            description: '',
+            url: 'https://www.producthunt.com/search?q={{variables@$ctxTextSelection}}',
+            userAgent: '',
+            active: true,
+            inGroup: false,
+            waitTabLoaded: false,
+            updatePrevTab: false,
+            customUserAgent: false,
+          },
+          id: 'pdeg5g8',
+          selected: false,
+        },
+      ],
+      edges: [
+        {
+          id: 'vueflow__edge-MeMnYgI8DFrfORUfmREmqMeMnYgI8DFrfORUfmREmq-output-1-pdeg5g8pdeg5g8-input-1',
+          source: 'MeMnYgI8DFrfORUfmREmq',
+          target: 'pdeg5g8',
+          sourceHandle: 'MeMnYgI8DFrfORUfmREmq-output-1',
+          targetHandle: 'pdeg5g8-input-1',
+          updatable: true,
+          selectable: true,
+          type: 'default',
+          markerEnd: '',
+          z: 0,
+          sourceX: 0,
+          sourceY: 0,
+          targetX: 0,
+          targetY: 0,
+        },
+      ],
+      position: [136.59999999999997, 279.20001831054685],
+      zoom: 1.3,
+    },
+  },
+  {
+    id: nanoid(),
+    createdAt: Date.now(),
+    name: 'Google Keyword Research',
+    icon: 'https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg',
+    table: [
+      {
+        id: '25D2q',
+        name: 'keyword',
+        type: 'string',
+      },
+      {
+        id: '38NQr',
+        name: 'related',
+        type: 'string',
+      },
+    ],
+    drawflow: {
+      nodes: [
+        {
+          computedPosition: {
+            x: 96,
+            y: 36,
+            z: 0,
+          },
+          data: {
+            activeInInput: false,
+            contextMenuName: '',
+            contextTypes: [],
+            date: '',
+            days: [],
+            delay: 5,
+            description: '',
+            disableBlock: false,
+            interval: 60,
+            isUrlRegex: false,
+            observeElement: {
+              baseElOptions: {
+                attributeFilter: [],
+                attributes: false,
+                characterData: false,
+                childList: true,
+                subtree: false,
+              },
+              baseSelector: '',
+              matchPattern: '',
+              selector: '',
+              targetOptions: {
+                attributeFilter: [],
+                attributes: false,
+                characterData: false,
+                childList: true,
+                subtree: false,
+              },
+            },
+            parameters: [
+              {
+                defaultValue: '',
+                name: 'keywords',
+                placeholder: 'keyword 1,keyword 2',
+                type: 'string',
+              },
+            ],
+            shortcut: '',
+            time: '00:00',
+            type: 'manual',
+            url: '',
+          },
+          dimensions: {
+            width: 192,
+            height: 72,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: '2VtN_ZVBleyrXpIe6hHqm-output-1',
+                position: 'right',
+                x: 196.000030930837,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          id: '2VtN_ZVBleyrXpIe6hHqm',
+          label: 'trigger',
+          position: {
+            x: 96,
+            y: 36,
+          },
+          selected: false,
+          type: 'BlockBasic',
+        },
+        {
+          computedPosition: {
+            x: 388,
+            y: 36,
+            z: 0,
+          },
+          data: {
+            active: true,
+            customUserAgent: false,
+            description: '',
+            disableBlock: false,
+            inGroup: false,
+            updatePrevTab: false,
+            url: 'https://www.google.com/',
+            userAgent: '',
+            waitTabLoaded: false,
+          },
+          dimensions: {
+            width: 192,
+            height: 72,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: 'q2ayq0p-output-1',
+                position: 'right',
+                x: 195.99998279147678,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'q2ayq0p-input-1',
+                position: 'left',
+                x: -19.999978595309788,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          id: 'q2ayq0p',
+          label: 'new-tab',
+          position: {
+            x: 388,
+            y: 36,
+          },
+          selected: false,
+          type: 'BlockBasic',
+        },
+        {
+          computedPosition: {
+            x: 680,
+            y: 36,
+            z: 0,
+          },
+          data: {
+            code: "const keywords = automaRefData('variables', 'keywords');\nautomaSetVariable(\n  'keywords', \n  keywords.split(',').map((keyword) => keyword.trim())\n)",
+            description: '',
+            disableBlock: false,
+            everyNewTab: false,
+            preloadScripts: [],
+            runBeforeLoad: false,
+            timeout: 20000,
+          },
+          dimensions: {
+            width: 192,
+            height: 72,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: 'ls02uyr-output-1',
+                position: 'right',
+                x: 196.00007907019722,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'ls02uyr-input-1',
+                position: 'left',
+                x: -19.999882316589357,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          id: 'ls02uyr',
+          label: 'javascript-code',
+          position: {
+            x: 680,
+            y: 36,
+          },
+          selected: false,
+          type: 'BlockBasic',
+        },
+        {
+          computedPosition: {
+            x: 972,
+            y: 36,
+            z: 0,
+          },
+          data: {
+            description: '',
+            disableBlock: false,
+            elementSelector: '',
+            fromNumber: 1,
+            loopData: '[]',
+            loopId: 'keywords',
+            loopThrough: 'variable',
+            maxLoop: 0,
+            referenceKey: '',
+            resumeLastWorkflow: false,
+            startIndex: 0,
+            toNumber: 10,
+            variableName: 'keywords',
+            waitForSelector: false,
+            waitSelectorTimeout: 5000,
+          },
+          dimensions: {
+            width: 192,
+            height: 72,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: 'xk53h8i-output-1',
+                position: 'right',
+                x: 196.00007907019722,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'xk53h8i-input-1',
+                position: 'left',
+                x: -19.999978595309788,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          id: 'xk53h8i',
+          label: 'loop-data',
+          position: {
+            x: 972,
+            y: 36,
+          },
+          selected: false,
+          type: 'BlockBasic',
+        },
+        {
+          computedPosition: {
+            x: 680,
+            y: 158,
+            z: 0,
+          },
+          data: {
+            dataList: [
+              {
+                name: '25D2q',
+                type: 'table',
+                value: '{{loopData@keywords}}',
+              },
+            ],
+            description: '',
+            disableBlock: false,
+          },
+          dimensions: {
+            width: 192,
+            height: 72,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: 'f1fo1xh-output-1',
+                position: 'right',
+                x: 196.00007907019722,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'f1fo1xh-input-1',
+                position: 'left',
+                x: -19.999882316589357,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          id: 'f1fo1xh',
+          label: 'insert-data',
+          position: {
+            x: 680,
+            y: 158,
+          },
+          selected: false,
+          type: 'BlockBasic',
+        },
+        {
+          computedPosition: {
+            x: 103.18645833333312,
+            y: 284.19444444444446,
+            z: 0,
+          },
+          data: {
+            disableBlock: false,
+            loopId: 'keywords',
+          },
+          dimensions: {
+            width: 192,
+            height: 117,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: 'xcsy0gj-output-1',
+                position: 'right',
+                x: 196.00007907019722,
+                y: 50.68752097023858,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'xcsy0gj-input-1',
+                position: 'left',
+                x: -20.000026734670005,
+                y: 50.68752097023858,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          id: 'xcsy0gj',
+          label: 'loop-breakpoint',
+          position: {
+            x: 103.18645833333312,
+            y: 284.19444444444446,
+          },
+          selected: false,
+          type: 'BlockLoopBreakpoint',
+        },
+        {
+          computedPosition: {
+            x: 96,
+            y: 158,
+            z: 0,
+          },
+          data: {
+            assignVariable: false,
+            clearValue: true,
+            dataColumn: '',
+            delay: 70,
+            description: '',
+            disableBlock: false,
+            events: [],
+            findBy: 'cssSelector',
+            getValue: false,
+            markEl: false,
+            multiple: false,
+            optionPosition: '1',
+            saveData: false,
+            selectOptionBy: 'value',
+            selected: true,
+            selector: 'input[name="q"]',
+            type: 'text-field',
+            value: '{{loopData@keywords}}',
+            variableName: '',
+            waitForSelector: false,
+            waitSelectorTimeout: 5000,
+          },
+          dimensions: {
+            width: 192,
+            height: 72,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: 'uoxxd4x-output-1',
+                position: 'right',
+                x: 196.000030930837,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'uoxxd4x-input-1',
+                position: 'left',
+                x: -19.999978595309788,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          id: 'uoxxd4x',
+          label: 'forms',
+          position: {
+            x: 96,
+            y: 158,
+          },
+          selected: false,
+          type: 'BlockBasic',
+        },
+        {
+          computedPosition: {
+            x: 388,
+            y: 158,
+            z: 0,
+          },
+          data: {
+            disableBlock: false,
+            loopId: 'options',
+            maxLoop: 0,
+            toNumber: 10,
+            fromNumber: 1,
+            startIndex: 0,
+            loopData: '[]',
+            description: '',
+            variableName: '',
+            referenceKey: '',
+            elementSelector: '[role="listbox"] [role="option"]',
+            waitForSelector: false,
+            waitSelectorTimeout: 5000,
+            resumeLastWorkflow: false,
+            loopThrough: 'elements',
+          },
+          dimensions: {
+            width: 192,
+            height: 72,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: 'kz3rbur-output-1',
+                position: 'right',
+                x: 195.99998279147678,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'kz3rbur-input-1',
+                position: 'left',
+                x: -19.999978595309788,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          id: 'kz3rbur',
+          label: 'loop-data',
+          position: {
+            x: 388,
+            y: 158,
+          },
+          selected: false,
+          type: 'BlockBasic',
+        },
+        {
+          computedPosition: {
+            x: 972,
+            y: 158,
+            z: 0,
+          },
+          data: {
+            disableBlock: false,
+            description: '',
+            findBy: 'cssSelector',
+            waitForSelector: false,
+            waitSelectorTimeout: 5000,
+            selector: '{{loopData@options}}',
+            markEl: false,
+            multiple: false,
+            regex: '',
+            prefixText: '',
+            suffixText: '',
+            regexExp: ['g', 'g', 'g'],
+            dataColumn: '38NQr',
+            saveData: true,
+            includeTags: false,
+            addExtraRow: false,
+            assignVariable: false,
+            useTextContent: false,
+            variableName: '',
+            extraRowValue: '',
+            extraRowDataColumn: '',
+          },
+          dimensions: {
+            width: 192,
+            height: 72,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: '5odnjn3-output-1',
+                position: 'right',
+                x: 196.00007907019722,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: '5odnjn3-input-1',
+                position: 'left',
+                x: -19.999978595309788,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          id: '5odnjn3',
+          label: 'get-text',
+          position: {
+            x: 972,
+            y: 158,
+          },
+          selected: false,
+          type: 'BlockBasic',
+        },
+        {
+          computedPosition: {
+            x: 1227.7190972222222,
+            y: 134.33854166666666,
+            z: 1000,
+          },
+          data: {
+            disableBlock: false,
+            loopId: 'options',
+          },
+          dimensions: {
+            width: 192,
+            height: 117,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: 'th64xxb-output-1',
+                position: 'right',
+                x: 195.99998279147678,
+                y: 50.68747283087836,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'th64xxb-input-1',
+                position: 'left',
+                x: -19.999978595309788,
+                y: 50.68747283087836,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          id: 'th64xxb',
+          label: 'loop-breakpoint',
+          position: {
+            x: 1227.7190972222222,
+            y: 134.33854166666666,
+          },
+          selected: true,
+          type: 'BlockLoopBreakpoint',
+        },
+        {
+          type: 'BlockBasic',
+          dimensions: {
+            width: 192,
+            height: 72,
+          },
+          handleBounds: {
+            source: [
+              {
+                id: 'tts9dbc-output-1',
+                position: 'right',
+                x: 196.00007907019722,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'tts9dbc-input-1',
+                position: 'left',
+                x: -19.999882316589357,
+                y: 28.00001817279392,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          computedPosition: {
+            x: 376.2090277777778,
+            y: 307.24879056082835,
+            z: 0,
+          },
+          position: {
+            x: 376.2090277777778,
+            y: 307.24879056082835,
+          },
+          label: 'export-data',
+          data: {
+            disableBlock: false,
+            name: 'google-keywords',
+            refKey: '',
+            type: 'csv',
+            description: '',
+            variableName: '',
+            csvDelimiter: ',',
+            addBOMHeader: true,
+            onConflict: 'uniquify',
+            dataToExport: 'data-columns',
+          },
+          id: 'tts9dbc',
+          selected: false,
+        },
+      ],
+      edges: [
+        {
+          id: 'vueflow__edge-2VtN_ZVBleyrXpIe6hHqm2VtN_ZVBleyrXpIe6hHqm-output-1-q2ayq0pq2ayq0p-input-1',
+          class: 'source-2VtN_ZVBleyrXpIe6hHqm-output-1 target-q2ayq0p-input-1',
+          markerEnd: '',
+          selectable: true,
+          source: '2VtN_ZVBleyrXpIe6hHqm',
+          sourceHandle: '2VtN_ZVBleyrXpIe6hHqm-output-1',
+          sourceX: 0,
+          sourceY: 0,
+          target: 'q2ayq0p',
+          targetHandle: 'q2ayq0p-input-1',
+          targetX: 0,
+          targetY: 0,
+          type: 'default',
+          updatable: true,
+          z: 0,
+        },
+        {
+          id: 'vueflow__edge-q2ayq0pq2ayq0p-output-1-ls02uyrls02uyr-input-1',
+          markerEnd: '',
+          selectable: true,
+          selected: false,
+          source: 'q2ayq0p',
+          sourceHandle: 'q2ayq0p-output-1',
+          sourceX: 0,
+          sourceY: 0,
+          target: 'ls02uyr',
+          targetHandle: 'ls02uyr-input-1',
+          targetX: 0,
+          targetY: 0,
+          type: 'default',
+          updatable: true,
+          z: 0,
+        },
+        {
+          id: 'vueflow__edge-ls02uyrls02uyr-output-1-xk53h8ixk53h8i-input-1',
+          markerEnd: '',
+          selectable: true,
+          source: 'ls02uyr',
+          sourceHandle: 'ls02uyr-output-1',
+          sourceX: 0,
+          sourceY: 0,
+          target: 'xk53h8i',
+          targetHandle: 'xk53h8i-input-1',
+          targetX: 0,
+          targetY: 0,
+          type: 'default',
+          updatable: true,
+          z: 0,
+        },
+        {
+          id: 'edge-6k9nnc2',
+          class: 'source-uoxxd4x-output-1 target-kz3rbur-input-1',
+          markerEnd: '',
+          selectable: true,
+          selected: false,
+          source: 'uoxxd4x',
+          sourceHandle: 'uoxxd4x-output-1',
+          sourceX: 0,
+          sourceY: 0,
+          target: 'kz3rbur',
+          targetHandle: 'kz3rbur-input-1',
+          targetX: 0,
+          targetY: 0,
+          type: 'default',
+          updatable: true,
+          z: 0,
+        },
+        {
+          id: 'vueflow__edge-kz3rburkz3rbur-output-1-f1fo1xhf1fo1xh-input-1',
+          class: 'source-kz3rbur-output-1 target-f1fo1xh-input-1',
+          markerEnd: '',
+          selectable: true,
+          selected: false,
+          source: 'kz3rbur',
+          sourceHandle: 'kz3rbur-output-1',
+          sourceX: 0,
+          sourceY: 0,
+          target: 'f1fo1xh',
+          targetHandle: 'f1fo1xh-input-1',
+          targetX: 0,
+          targetY: 0,
+          type: 'default',
+          updatable: true,
+          z: 0,
+        },
+        {
+          id: 'vueflow__edge-f1fo1xhf1fo1xh-output-1-5odnjn35odnjn3-input-1',
+          class: 'source-f1fo1xh-output-1 target-5odnjn3-input-1',
+          markerEnd: '',
+          selectable: true,
+          selected: false,
+          source: 'f1fo1xh',
+          sourceHandle: 'f1fo1xh-output-1',
+          sourceX: 0,
+          sourceY: 0,
+          target: '5odnjn3',
+          targetHandle: '5odnjn3-input-1',
+          targetX: 0,
+          targetY: 0,
+          type: 'default',
+          updatable: true,
+          z: 0,
+        },
+        {
+          id: 'vueflow__edge-5odnjn35odnjn3-output-1-th64xxbth64xxb-input-1',
+          class: 'source-5odnjn3-output-1 target-th64xxb-input-1',
+          markerEnd: '',
+          selectable: true,
+          source: '5odnjn3',
+          sourceHandle: '5odnjn3-output-1',
+          sourceX: 0,
+          sourceY: 0,
+          target: 'th64xxb',
+          targetHandle: 'th64xxb-input-1',
+          targetX: 0,
+          targetY: 0,
+          type: 'default',
+          updatable: true,
+          z: 0,
+        },
+        {
+          id: 'vueflow__edge-th64xxbth64xxb-output-1-xcsy0gjxcsy0gj-input-1',
+          class: 'source-th64xxb-output-1 target-xcsy0gj-input-1',
+          markerEnd: '',
+          selectable: true,
+          source: 'th64xxb',
+          sourceHandle: 'th64xxb-output-1',
+          sourceX: 0,
+          sourceY: 0,
+          target: 'xcsy0gj',
+          targetHandle: 'xcsy0gj-input-1',
+          targetX: 0,
+          targetY: 0,
+          type: 'default',
+          updatable: true,
+          z: 0,
+        },
+        {
+          id: 'vueflow__edge-xk53h8ixk53h8i-output-1-uoxxd4xuoxxd4x-input-1',
+          class: 'source-xk53h8i-output-1 target-uoxxd4x-input-1',
+          markerEnd: '',
+          selectable: true,
+          source: 'xk53h8i',
+          sourceHandle: 'xk53h8i-output-1',
+          sourceX: 0,
+          sourceY: 0,
+          target: 'uoxxd4x',
+          targetHandle: 'uoxxd4x-input-1',
+          targetX: 0,
+          targetY: 0,
+          type: 'default',
+          updatable: true,
+          z: 0,
+        },
+        {
+          id: 'vueflow__edge-xcsy0gjxcsy0gj-output-1-tts9dbctts9dbc-input-1',
+          source: 'xcsy0gj',
+          target: 'tts9dbc',
+          sourceHandle: 'xcsy0gj-output-1',
+          targetHandle: 'tts9dbc-input-1',
+          updatable: true,
+          selectable: true,
+          type: 'default',
+          markerEnd: '',
+          z: 0,
+          sourceX: 0,
+          sourceY: 0,
+          targetX: 0,
+          targetY: 0,
+        },
+      ],
+      position: [-7.494827206691525, 274.2219861731927],
+      zoom: 0.6339423288575831,
+    },
+  },
 ];