Quellcode durchsuchen

chore: update first workflows

Ahmad Kholid vor 2 Jahren
Ursprung
Commit
708f101eb7
1 geänderte Dateien mit 507 neuen und 0 gelöschten Zeilen
  1. 507 0
      src/utils/firstWorkflows.js

+ 507 - 0
src/utils/firstWorkflows.js

@@ -1,6 +1,513 @@
 import { nanoid } from 'nanoid';
 
 export default [
+  {
+    id: nanoid(),
+    name: 'Twitter Trends to Google Sheets',
+    icon: 'https://upload.wikimedia.org/wikipedia/commons/4/4f/Twitter-logo.svg',
+    table: [
+      { id: '6QbkU', name: 'text', type: 'string' },
+      { id: 'Q-zII', name: 'tweets_count', type: 'integer' },
+    ],
+    drawflow: {
+      nodes: [
+        {
+          type: 'BlockBasic',
+          dimensions: { width: 192, height: 72 },
+          handleBounds: {
+            source: [
+              {
+                id: 'F_uKdk2VrnKslRle78d-C-output-1',
+                position: 'right',
+                x: 196,
+                y: 28,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          computedPosition: { x: 96, y: 75.5, z: 0 },
+          selected: false,
+          dragging: false,
+          resizing: false,
+          initialized: true,
+          data: {
+            disableBlock: false,
+            description: '',
+            type: 'manual',
+            interval: 60,
+            delay: 5,
+            date: '',
+            time: '00:00',
+            url: '',
+            shortcut: '',
+            activeInInput: false,
+            isUrlRegex: false,
+            days: [],
+            contextMenuName: '',
+            contextTypes: [],
+            parameters: [],
+            preferParamsInTab: false,
+            observeElement: {
+              selector: '',
+              baseSelector: '',
+              matchPattern: '',
+              targetOptions: {
+                subtree: false,
+                childList: true,
+                attributes: false,
+                attributeFilter: [],
+                characterData: false,
+              },
+              baseElOptions: {
+                subtree: false,
+                childList: true,
+                attributes: false,
+                attributeFilter: [],
+                characterData: false,
+              },
+            },
+          },
+          events: {},
+          position: { x: 96, y: 75.5 },
+          id: 'F_uKdk2VrnKslRle78d-C',
+          label: 'trigger',
+        },
+        {
+          type: 'BlockBasic',
+          dimensions: { width: 192, height: 72 },
+          handleBounds: {
+            source: [
+              {
+                id: '369o3ob-output-1',
+                position: 'right',
+                x: 196,
+                y: 28,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: '369o3ob-input-1',
+                position: 'left',
+                x: -20,
+                y: 28,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          computedPosition: { x: 388, y: 75.5, z: 0 },
+          selected: false,
+          dragging: false,
+          resizing: false,
+          initialized: true,
+          data: {
+            disableBlock: false,
+            description: '',
+            url: 'https://twitter.com/i/trends',
+            userAgent: '',
+            active: true,
+            inGroup: false,
+            waitTabLoaded: false,
+            updatePrevTab: false,
+            customUserAgent: false,
+          },
+          events: {},
+          position: { x: 388, y: 75.5 },
+          label: 'new-tab',
+          id: '369o3ob',
+        },
+        {
+          type: 'BlockBasic',
+          dimensions: { width: 192, height: 72 },
+          handleBounds: {
+            source: [
+              {
+                id: 'f0ky2jr-output-1',
+                position: 'right',
+                x: 196,
+                y: 28,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'f0ky2jr-input-1',
+                position: 'left',
+                x: -20,
+                y: 28,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          computedPosition: { x: 680, y: 75.5, z: 0 },
+          selected: false,
+          dragging: false,
+          resizing: false,
+          initialized: true,
+          data: {
+            disableBlock: false,
+            loopId: 'items',
+            selector: '[data-testid="trend"]',
+            maxLoop: '0',
+            description: '',
+            reverseLoop: false,
+            actionElSelector: '',
+            findBy: 'cssSelector',
+            actionElMaxWaitTime: 5,
+            actionPageMaxWaitTime: 10,
+            loadMoreAction: 'scroll',
+            scrollToBottom: true,
+            waitForSelector: true,
+            waitSelectorTimeout: 5000,
+          },
+          events: {},
+          id: 'f0ky2jr',
+          label: 'loop-elements',
+          position: { x: 680, y: 75.5 },
+        },
+        {
+          type: 'BlockBasic',
+          dimensions: { width: 192, height: 72 },
+          handleBounds: {
+            source: [
+              {
+                id: 'tpiq3ux-output-1',
+                position: 'right',
+                x: 196,
+                y: 28,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'tpiq3ux-input-1',
+                position: 'left',
+                x: -20,
+                y: 28,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          computedPosition: { x: 972, y: 75.5, z: 0 },
+          selected: false,
+          dragging: false,
+          resizing: false,
+          initialized: true,
+          data: {
+            disableBlock: false,
+            description: 'Trending text',
+            findBy: 'cssSelector',
+            waitForSelector: false,
+            waitSelectorTimeout: 5000,
+            selector: '{{loopData.items}} > div > div[dir="ltr"]:nth-child(2)',
+            markEl: false,
+            multiple: false,
+            regex: '',
+            prefixText: '',
+            suffixText: '',
+            regexExp: [],
+            dataColumn: '6QbkU',
+            saveData: true,
+            includeTags: false,
+            addExtraRow: false,
+            assignVariable: false,
+            useTextContent: false,
+            variableName: '',
+            extraRowValue: '',
+            extraRowDataColumn: '',
+          },
+          events: {},
+          position: { x: 972, y: 75.5 },
+          label: 'get-text',
+          id: 'tpiq3ux',
+        },
+        {
+          type: 'BlockBasic',
+          dimensions: { width: 192, height: 72 },
+          handleBounds: {
+            source: [
+              {
+                id: 'zel6am7-output-1',
+                position: 'right',
+                x: 196,
+                y: 28,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'zel6am7-input-1',
+                position: 'left',
+                x: -20,
+                y: 28,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          computedPosition: { x: 1264, y: 75.5, z: 0 },
+          selected: false,
+          dragging: false,
+          resizing: false,
+          initialized: true,
+          data: {
+            disableBlock: false,
+            description: 'Trending tweets count',
+            findBy: 'cssSelector',
+            waitForSelector: false,
+            waitSelectorTimeout: 5000,
+            selector: '{{loopData.items}} > div > div[dir="ltr"]:nth-child(3)',
+            markEl: false,
+            multiple: false,
+            regex: '',
+            prefixText: '',
+            suffixText: '',
+            regexExp: [],
+            dataColumn: 'Q-zII',
+            saveData: true,
+            includeTags: false,
+            addExtraRow: false,
+            assignVariable: false,
+            useTextContent: false,
+            variableName: '',
+            extraRowValue: '',
+            extraRowDataColumn: '',
+          },
+          events: {},
+          label: 'get-text',
+          id: 'zel6am7',
+          position: { x: 1264, y: 75.5 },
+        },
+        {
+          type: 'BlockLoopBreakpoint',
+          dimensions: { width: 192, height: 151 },
+          handleBounds: {
+            source: [
+              {
+                id: 'mfzs3rz-output-1',
+                position: 'right',
+                x: 196,
+                y: 67.6875,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: 'mfzs3rz-input-1',
+                position: 'left',
+                x: -20,
+                y: 67.6875,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          computedPosition: { x: 1556, y: 75.5, z: 0 },
+          selected: false,
+          dragging: false,
+          resizing: false,
+          initialized: true,
+          data: { disableBlock: false, loopId: 'items', clearLoop: false },
+          events: {},
+          position: { x: 1556, y: 75.5 },
+          label: 'loop-breakpoint',
+          id: 'mfzs3rz',
+        },
+        {
+          type: 'BlockBasic',
+          dimensions: { width: 192, height: 72 },
+          handleBounds: {
+            source: [
+              {
+                id: '8tor34x-output-1',
+                position: 'right',
+                x: 196.00022007042253,
+                y: 27.999996538337534,
+                width: 16,
+                height: 16,
+              },
+            ],
+            target: [
+              {
+                id: '8tor34x-input-1',
+                position: 'left',
+                x: -19.99993470685429,
+                y: 27.999996538337534,
+                width: 16,
+                height: 16,
+              },
+            ],
+          },
+          computedPosition: {
+            x: 1839.6148017621147,
+            y: 112.0740088105727,
+            z: 0,
+          },
+          selected: false,
+          dragging: false,
+          resizing: false,
+          initialized: true,
+          data: {
+            disableBlock: false,
+            range: '',
+            refKey: '',
+            type: 'update',
+            customData: '',
+            description: '',
+            spreadsheetId: '',
+            dataColumn: '',
+            saveData: true,
+            assignVariable: false,
+            variableName: '',
+            firstRowAsKey: false,
+            keysAsFirstRow: true,
+            valueInputOption: 'RAW',
+            InsertDataOption: 'INSERT_ROWS',
+            dataFrom: 'data-columns',
+          },
+          events: {},
+          position: { x: 1839.6148017621147, y: 112.0740088105727 },
+          label: 'google-sheets',
+          id: '8tor34x',
+        },
+        {
+          type: 'BlockNote',
+          dimensions: { width: 312, height: 251 },
+          handleBounds: {},
+          computedPosition: {
+            x: 322.1510553694428,
+            y: 207.59283268768826,
+            z: 0,
+          },
+          selected: false,
+          dragging: false,
+          resizing: false,
+          initialized: true,
+          data: {
+            disableBlock: false,
+            note: 'Read the documentation about the Google Sheets block before running this workflow',
+            drawing: false,
+            width: 280,
+            height: 168,
+            color: 'indigo',
+            fontSize: 'regular',
+          },
+          events: {},
+          position: { x: 322.1510553694428, y: 207.59283268768826 },
+          label: 'note',
+          id: '7rznotf',
+        },
+      ],
+      edges: [
+        {
+          id: 'vueflow__edge-F_uKdk2VrnKslRle78d-CF_uKdk2VrnKslRle78d-C-output-1-369o3ob369o3ob-input-1',
+          target: '369o3ob',
+          source: 'F_uKdk2VrnKslRle78d-C',
+          targetHandle: '369o3ob-input-1',
+          sourceHandle: 'F_uKdk2VrnKslRle78d-C-output-1',
+          type: 'custom',
+          updatable: true,
+          selectable: true,
+          markerEnd: 'arrowclosed',
+          data: {},
+          events: {},
+        },
+        {
+          id: 'edge-tczf2qq',
+          source: '369o3ob',
+          target: 'f0ky2jr',
+          sourceHandle: '369o3ob-output-1',
+          targetHandle: 'f0ky2jr-input-1',
+          type: 'custom',
+          updatable: true,
+          selectable: true,
+          markerEnd: 'arrowclosed',
+          data: {},
+          events: {},
+        },
+        {
+          id: 'vueflow__edge-f0ky2jrf0ky2jr-output-1-tpiq3uxtpiq3ux-input-1',
+          target: 'tpiq3ux',
+          source: 'f0ky2jr',
+          targetHandle: 'tpiq3ux-input-1',
+          sourceHandle: 'f0ky2jr-output-1',
+          type: 'custom',
+          updatable: true,
+          selectable: true,
+          markerEnd: 'arrowclosed',
+          data: {},
+          events: {},
+        },
+        {
+          id: 'vueflow__edge-tpiq3uxtpiq3ux-output-1-zel6am7zel6am7-input-1',
+          target: 'zel6am7',
+          source: 'tpiq3ux',
+          targetHandle: 'zel6am7-input-1',
+          sourceHandle: 'tpiq3ux-output-1',
+          type: 'custom',
+          updatable: true,
+          selectable: true,
+          markerEnd: 'arrowclosed',
+          data: {},
+          events: {},
+        },
+        {
+          id: 'vueflow__edge-zel6am7zel6am7-output-1-mfzs3rzmfzs3rz-input-1',
+          target: 'mfzs3rz',
+          source: 'zel6am7',
+          targetHandle: 'mfzs3rz-input-1',
+          sourceHandle: 'zel6am7-output-1',
+          type: 'custom',
+          updatable: true,
+          selectable: true,
+          markerEnd: 'arrowclosed',
+          data: {},
+          events: {},
+        },
+        {
+          id: 'vueflow__edge-mfzs3rzmfzs3rz-output-1-8tor34x8tor34x-input-1',
+          target: '8tor34x',
+          source: 'mfzs3rz',
+          targetHandle: '8tor34x-input-1',
+          sourceHandle: 'mfzs3rz-output-1',
+          type: 'custom',
+          updatable: true,
+          selectable: true,
+          markerEnd: 'arrowclosed',
+          data: {},
+          events: {},
+        },
+      ],
+      position: [-169.83007474880947, 65.03712768543713],
+      zoom: 0.9365333557481814,
+    },
+    settings: {
+      publicId: '',
+      blockDelay: 0,
+      saveLog: true,
+      debugMode: false,
+      restartTimes: 3,
+      notification: true,
+      execContext: 'popup',
+      reuseLastState: false,
+      inputAutocomplete: true,
+      onError: 'stop-workflow',
+      executedBlockOnWeb: false,
+      insertDefaultColumn: false,
+      defaultColumnName: 'column',
+    },
+    globalData: '{\n\t"key": "value"\n}',
+    description: 'Import current twitter trends to Google Sheets',
+  },
   {
     id: nanoid(),
     name: 'Google search',