123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506 |
- export const tasks = {
- trigger: {
- name: 'Trigger',
- description: 'Block where workflow will start executing',
- icon: 'riFlashlightLine',
- component: 'BlockBasic',
- editComponent: 'EditTrigger',
- category: 'general',
- inputs: 0,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['url'],
- data: {
- disableBlock: false,
- description: '',
- type: 'manual',
- interval: 60,
- delay: 5,
- date: '',
- time: '00:00',
- url: '',
- shortcut: '',
- activeInInput: false,
- isUrlRegex: false,
- days: [],
- contextMenuName: '',
- contextTypes: [],
- 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,
- },
- },
- },
- },
- 'execute-workflow': {
- name: 'Execute workflow',
- description: '',
- icon: 'riFlowChart',
- component: 'BlockBasic',
- category: 'general',
- editComponent: 'EditExecuteWorkflow',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['globalData'],
- data: {
- disableBlock: false,
- executeId: '',
- workflowId: '',
- globalData: '',
- description: '',
- },
- },
- 'active-tab': {
- name: 'Active tab',
- description: "Set current tab that you're in as an active tab",
- icon: 'riWindowLine',
- component: 'BlockBasic',
- category: 'browser',
- disableEdit: true,
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- },
- },
- 'new-tab': {
- name: 'New tab',
- description: 'Create a new tab',
- icon: 'riGlobalLine',
- component: 'BlockBasic',
- editComponent: 'EditNewTab',
- category: 'browser',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['url'],
- data: {
- disableBlock: false,
- description: '',
- url: '',
- userAgent: '',
- active: true,
- inGroup: false,
- waitTabLoaded: false,
- updatePrevTab: false,
- customUserAgent: false,
- },
- },
- 'switch-tab': {
- name: 'Switch tab',
- description: 'Switch active tab',
- icon: 'riArrowLeftRightLine',
- component: 'BlockBasic',
- editComponent: 'EditSwitchTab',
- category: 'browser',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['url', 'matchPattern'],
- data: {
- disableBlock: false,
- description: '',
- url: '',
- tabIndex: 0,
- matchPattern: '',
- activeTab: true,
- createIfNoMatch: false,
- findTabBy: 'match-patterns',
- },
- },
- 'new-window': {
- name: 'New window',
- description: 'Create a new window',
- icon: 'riWindow2Line',
- component: 'BlockBasic',
- editComponent: 'EditNewWindow',
- category: 'browser',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['url'],
- data: {
- disableBlock: false,
- description: '',
- top: 0,
- left: 0,
- width: 0,
- url: '',
- height: 0,
- type: 'normal',
- incognito: false,
- windowState: 'normal',
- },
- },
- proxy: {
- name: 'Proxy',
- description: 'Set the proxy of the browser',
- icon: 'riShieldKeyholeLine',
- component: 'BlockBasic',
- category: 'browser',
- editComponent: 'EditProxy',
- inputs: 1,
- outputs: 1,
- maxConnection: 1,
- allowedInputs: true,
- refDataKeys: ['host', 'port', 'scheme'],
- data: {
- description: '',
- disableBlock: false,
- scheme: 'https',
- host: '',
- port: 443,
- bypassList: '',
- clearProxy: false,
- },
- },
- 'go-back': {
- name: 'Go back',
- description: 'Go back to the previous page',
- icon: 'riArrowGoBackLine',
- component: 'BlockBasic',
- category: 'browser',
- inputs: 1,
- outputs: 1,
- maxConnection: 1,
- disableEdit: true,
- allowedInputs: true,
- data: {
- disableBlock: false,
- },
- },
- 'forward-page': {
- name: 'Go forward',
- description: 'Go forward to the next page',
- icon: 'riArrowGoForwardLine',
- component: 'BlockBasic',
- category: 'browser',
- inputs: 1,
- outputs: 1,
- maxConnection: 1,
- disableEdit: true,
- allowedInputs: true,
- data: {
- disableBlock: false,
- },
- },
- 'close-tab': {
- name: 'Close tab/window',
- icon: 'riCloseCircleLine',
- component: 'BlockBasic',
- category: 'browser',
- editComponent: 'EditCloseTab',
- inputs: 1,
- outputs: 1,
- maxConnection: 1,
- allowedInputs: true,
- refDataKeys: ['url'],
- data: {
- disableBlock: false,
- url: '',
- description: '',
- activeTab: true,
- closeType: 'tab',
- allWindows: false,
- },
- },
- 'take-screenshot': {
- name: 'Take screenshot',
- description: 'Take a screenshot of current active tab',
- icon: 'riImageLine',
- component: 'BlockBasic',
- category: 'browser',
- editComponent: 'EditTakeScreenshot',
- inputs: 1,
- outputs: 1,
- maxConnection: 1,
- allowedInputs: true,
- refDataKeys: ['fileName'],
- autocomplete: ['variableName'],
- data: {
- description: '',
- disableBlock: false,
- fileName: '',
- ext: 'png',
- quality: 100,
- dataColumn: '',
- variableName: '',
- selector: '',
- fullPage: false,
- saveToColumn: false,
- saveToComputer: true,
- assignVariable: false,
- captureActiveTab: true,
- },
- },
- 'browser-event': {
- name: 'Browser event',
- description: 'Wait until the selected event is triggered',
- icon: 'riLightbulbLine',
- component: 'BlockBasic',
- category: 'browser',
- editComponent: 'EditBrowserEvent',
- inputs: 1,
- outputs: 1,
- maxConnection: 1,
- allowedInputs: true,
- data: {
- disableBlock: false,
- description: '',
- timeout: 10000,
- eventName: 'tab:loaded',
- setAsActiveTab: true,
- activeTabLoaded: true,
- tabLoadedUrl: '',
- tabUrl: '',
- fileQuery: '',
- },
- },
- 'event-click': {
- name: 'Click element',
- icon: 'riCursorLine',
- component: 'BlockBasic',
- editComponent: 'EditInteractionBase',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector'],
- data: {
- disableBlock: false,
- description: '',
- findBy: 'cssSelector',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- selector: '',
- markEl: false,
- multiple: false,
- },
- },
- delay: {
- name: 'Delay',
- description: 'Add delay before executing the next block',
- icon: 'riTimerLine',
- component: 'BlockDelay',
- editComponent: 'EditDelay',
- category: 'general',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['time'],
- data: {
- disableBlock: false,
- time: 500,
- },
- },
- 'get-text': {
- name: 'Get text',
- description: 'Get text from an element',
- icon: 'riParagraph',
- component: 'BlockBasic',
- editComponent: 'EditGetText',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector', 'prefixText', 'suffixText', 'extraRowValue'],
- autocomplete: ['variableName'],
- data: {
- disableBlock: false,
- description: '',
- findBy: 'cssSelector',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- selector: '',
- markEl: false,
- multiple: false,
- regex: '',
- prefixText: '',
- suffixText: '',
- regexExp: ['g'],
- dataColumn: '',
- saveData: true,
- includeTags: false,
- addExtraRow: false,
- assignVariable: false,
- variableName: '',
- extraRowValue: '',
- extraRowDataColumn: '',
- },
- },
- 'export-data': {
- name: 'Export data',
- icon: 'riDownloadLine',
- component: 'BlockBasic',
- editComponent: 'EditExportData',
- category: 'general',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['name'],
- data: {
- disableBlock: false,
- name: '',
- refKey: '',
- type: 'json',
- description: '',
- variableName: '',
- csvDelimiter: ',',
- addBOMHeader: true,
- onConflict: 'uniquify',
- dataToExport: 'data-columns',
- },
- },
- 'element-scroll': {
- name: 'Scroll element',
- icon: 'riMouseLine',
- component: 'BlockBasic',
- editComponent: 'EditScrollElement',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector'],
- data: {
- disableBlock: false,
- description: '',
- findBy: 'cssSelector',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- selector: 'html',
- markEl: false,
- multiple: false,
- scrollY: 0,
- scrollX: 0,
- incX: false,
- incY: false,
- smooth: false,
- scrollIntoView: false,
- },
- },
- link: {
- name: 'Link',
- description: 'Open link element',
- icon: 'riLink',
- component: 'BlockBasic',
- editComponent: 'EditInteractionBase',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector'],
- data: {
- disableBlock: false,
- description: '',
- findBy: 'cssSelector',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- selector: '',
- markEl: false,
- disableMultiple: true,
- },
- },
- 'attribute-value': {
- name: 'Attribute value',
- description: 'Get attribute value of an element',
- icon: 'riBracketsLine',
- component: 'BlockBasic',
- editComponent: 'EditAttributeValue',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector', 'attributeName', 'extraRowValue'],
- autocomplete: ['variableName'],
- data: {
- disableBlock: false,
- description: '',
- findBy: 'cssSelector',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- selector: '',
- markEl: false,
- multiple: false,
- attributeName: '',
- assignVariable: false,
- variableName: '',
- dataColumn: '',
- saveData: true,
- addExtraRow: false,
- extraRowValue: '',
- extraRowDataColumn: '',
- },
- },
- forms: {
- name: 'Forms',
- icon: 'riInputCursorMove',
- description: 'Manipulate form(input, select, checkbox, and radio) element',
- component: 'BlockBasic',
- editComponent: 'EditForms',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector', 'value', 'optionPosition'],
- autocomplete: ['variableName'],
- data: {
- disableBlock: false,
- description: '',
- findBy: 'cssSelector',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- selector: '',
- markEl: false,
- multiple: false,
- selected: true,
- clearValue: true,
- getValue: false,
- saveData: false,
- dataColumn: '',
- selectOptionBy: 'value',
- optionPosition: '1',
- assignVariable: false,
- variableName: '',
- type: 'text-field',
- value: '',
- delay: 0,
- events: [],
- },
- },
- 'repeat-task': {
- name: 'Repeat task',
- icon: 'riRepeat2Line',
- component: 'BlockRepeatTask',
- category: 'general',
- inputs: 1,
- outputs: 2,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- repeatFor: 1,
- },
- },
- 'javascript-code': {
- name: 'JavaScript code',
- description: 'Execute your custom javascript code in a webpage',
- icon: 'riCodeSSlashLine',
- component: 'BlockBasic',
- editComponent: 'EditJavascriptCode',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- timeout: 20000,
- code: 'console.log("Hello world!");\nautomaNextBlock()',
- preloadScripts: [],
- everyNewTab: false,
- runBeforeLoad: false,
- },
- },
- 'trigger-event': {
- name: 'Trigger event',
- description: 'Trigger event',
- icon: 'riLightbulbFlashLine',
- component: 'BlockBasic',
- editComponent: 'EditTriggerEvent',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector', 'eventParams.clientX', 'eventParams.clientY'],
- data: {
- disableBlock: false,
- description: '',
- findBy: 'cssSelector',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- selector: 'html',
- markEl: false,
- multiple: false,
- eventName: '',
- eventType: '',
- eventParams: { bubbles: true, cancelable: false },
- },
- },
- 'google-sheets': {
- name: 'Google sheets',
- description: 'Read Google Sheets data',
- icon: 'mdiGoogleSheet',
- component: 'BlockBasic',
- editComponent: 'EditGoogleSheets',
- category: 'onlineServices',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['customData', 'range', 'spreadsheetId'],
- autocomplete: ['refKey'],
- data: {
- disableBlock: false,
- range: '',
- refKey: '',
- type: 'get',
- customData: '',
- description: '',
- spreadsheetId: '',
- dataColumn: '',
- saveData: true,
- assignVariable: false,
- variableName: '',
- firstRowAsKey: false,
- keysAsFirstRow: true,
- valueInputOption: 'RAW',
- InsertDataOption: 'INSERT_ROWS',
- dataFrom: 'data-columns',
- },
- },
- conditions: {
- name: 'Conditions',
- description: 'Conditional block',
- icon: 'riAB',
- component: 'BlockConditions',
- editComponent: 'EditConditions',
- category: 'conditions',
- inputs: 1,
- outputs: 0,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- conditions: [],
- retryConditions: false,
- retryCount: 10,
- retryTimeout: 1000,
- },
- },
- 'element-exists': {
- name: 'Element exists',
- description: 'Check if an element is exists',
- icon: 'riFocus3Line',
- component: 'BlockElementExists',
- editComponent: 'EditElementExists',
- category: 'conditions',
- inputs: 1,
- outputs: 2,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector'],
- data: {
- disableBlock: false,
- description: '',
- findBy: 'cssSelector',
- selector: '',
- tryCount: 1,
- timeout: 500,
- markEl: false,
- throwError: false,
- },
- },
- webhook: {
- name: 'HTTP Request',
- description: 'make an HTTP request',
- icon: 'riEarthLine',
- component: 'BlockBasicWithFallback',
- editComponent: 'EditWebhook',
- category: 'general',
- inputs: 1,
- outputs: 2,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['body', 'url'],
- autocomplete: ['variableName'],
- data: {
- disableBlock: false,
- description: '',
- url: '',
- body: '{}',
- headers: [],
- method: 'POST',
- timeout: 10000,
- dataPath: '',
- contentType: 'json',
- variableName: '',
- assignVariable: false,
- saveData: false,
- dataColumn: '',
- responseType: 'json',
- },
- },
- 'while-loop': {
- name: 'While loop',
- description: 'Execute blocks while the condition is met',
- icon: 'riRefreshFill',
- component: 'BlockBasicWithFallback',
- editComponent: 'EditWhileLoop',
- category: 'general',
- inputs: 1,
- outputs: 2,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- conditions: null,
- },
- },
- 'loop-data': {
- name: 'Loop data',
- icon: 'riRefreshLine',
- component: 'BlockBasic',
- editComponent: 'EditLoopData',
- category: 'general',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: [
- 'maxLoop',
- 'loopData',
- 'variableName',
- 'referenceKey',
- 'elementSelector',
- ],
- autocomplete: ['variableName', 'loopId'],
- data: {
- disableBlock: false,
- loopId: '',
- maxLoop: 0,
- toNumber: 10,
- fromNumber: 1,
- startIndex: 0,
- loopData: '[]',
- description: '',
- variableName: '',
- referenceKey: '',
- elementSelector: '',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- resumeLastWorkflow: false,
- loopThrough: 'data-columns',
- },
- },
- 'loop-breakpoint': {
- name: 'Loop breakpoint',
- description: 'To tell where loop data must stop',
- icon: 'riStopLine',
- component: 'BlockLoopBreakpoint',
- category: 'general',
- disableEdit: true,
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- loopId: '',
- },
- },
- 'blocks-group': {
- name: 'Blocks group',
- description: 'Grouping blocks',
- icon: 'riFolderZipLine',
- component: 'BlockGroup',
- category: 'general',
- disableEdit: true,
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- name: '',
- blocks: [],
- },
- },
- // 'blocks-group-2': {
- // name: 'Blocks group',
- // description: 'Grouping blocks',
- // icon: 'riFolderZipLine',
- // component: 'BlockGroup2',
- // category: 'general',
- // disableEdit: true,
- // inputs: 1,
- // outputs: 1,
- // allowedInputs: true,
- // maxConnection: 1,
- // data: {
- // disableBlock: false,
- // name: '',
- // width: 400,
- // height: 300,
- // borderColor: '#2563eb',
- // backgroundColor: 'rgb(37, 99, 235, 0.3)',
- // },
- // },
- clipboard: {
- name: 'Clipboard',
- description: 'Get the copied text from the clipboard',
- icon: 'riClipboardLine',
- component: 'BlockBasic',
- category: 'general',
- editComponent: 'EditClipboard',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- autocomplete: ['variableName'],
- refDataKeys: ['dataToCopy'],
- data: {
- disableBlock: false,
- description: '',
- type: 'get',
- assignVariable: false,
- variableName: '',
- saveData: true,
- dataColumn: '',
- dataToCopy: '',
- copySelectedText: false,
- },
- },
- 'insert-data': {
- name: 'Insert data',
- description: 'Insert data into table or variable',
- icon: 'riDatabase2Line',
- component: 'BlockBasic',
- category: 'data',
- editComponent: 'EditInsertData',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- dataList: [],
- },
- },
- 'switch-to': {
- name: 'Switch frame',
- description: 'Switch between main window and iframe',
- icon: 'riArrowUpDownLine',
- component: 'BlockBasic',
- editComponent: 'EditSwitchTo',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector'],
- data: {
- disableBlock: false,
- findBy: 'cssSelector',
- selector: '',
- windowType: 'main-window',
- },
- },
- 'upload-file': {
- name: 'Upload file',
- description: 'Upload file into <input type="file"> element',
- icon: 'riFileUploadLine',
- component: 'BlockBasic',
- editComponent: 'EditUploadFile',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector', 'filePaths'],
- data: {
- disableBlock: false,
- findBy: 'cssSelector',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- selector: '',
- filePaths: [],
- },
- },
- 'hover-element': {
- name: 'Hover element',
- description: 'Hover over an element',
- icon: 'mdiCursorDefaultClickOutline',
- component: 'BlockBasic',
- editComponent: 'EditInteractionBase',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector'],
- data: {
- disableBlock: false,
- description: '',
- findBy: 'cssSelector',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- selector: '',
- markEl: false,
- multiple: false,
- },
- },
- 'save-assets': {
- name: 'Save assets',
- description:
- 'Save assets (image, video, audio, or file) from an element or URL',
- icon: 'riImageLine',
- component: 'BlockBasic',
- editComponent: 'EditSaveAssets',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector', 'url', 'filename'],
- data: {
- disableBlock: false,
- description: '',
- findBy: 'cssSelector',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- selector: '',
- markEl: false,
- multiple: false,
- type: 'element',
- url: '',
- filename: '',
- onConflict: 'uniquify',
- },
- },
- 'press-key': {
- name: 'Press key',
- description: 'Press a key or a combination',
- icon: 'riKeyboardLine',
- component: 'BlockBasic',
- editComponent: 'EditPressKey',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['selector', 'keys'],
- data: {
- disableBlock: false,
- keys: '',
- selector: '',
- description: '',
- },
- },
- 'handle-dialog': {
- name: 'Handle dialog',
- description:
- 'Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).',
- icon: 'riChat3Line',
- component: 'BlockBasic',
- editComponent: 'EditHandleDialog',
- category: 'browser',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['promptText'],
- data: {
- disableBlock: false,
- description: '',
- accept: true,
- promptText: '',
- },
- },
- 'handle-download': {
- name: 'Handle download',
- description: 'Handle downloaded file',
- icon: 'riFileDownloadLine',
- component: 'BlockBasic',
- editComponent: 'EditHandleDownload',
- category: 'browser',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['filename'],
- autocomplete: ['variableName'],
- data: {
- disableBlock: false,
- description: '',
- filename: '',
- timeout: 20000,
- onConflict: 'uniquify',
- waitForDownload: true,
- dataColumn: '',
- saveData: true,
- assignVariable: false,
- variableName: '',
- },
- },
- 'reload-tab': {
- name: 'Reload tab',
- description: 'Reload the active tab',
- icon: 'riRestartLine',
- component: 'BlockBasic',
- category: 'browser',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- disableEdit: true,
- data: {
- disableBlock: false,
- },
- },
- 'delete-data': {
- name: 'Delete data',
- description: 'Delete table or variable data',
- icon: 'riDeleteBin7Line',
- editComponent: 'EditDeleteData',
- component: 'BlockBasic',
- category: 'data',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- deleteList: [],
- },
- },
- 'wait-connections': {
- name: 'Wait connections',
- description: 'Wait for all connections before continuing to the next block',
- icon: 'riTimerFlashLine',
- editComponent: 'EditWaitConnections',
- component: 'BlockBasic',
- category: 'general',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- timeout: 10000,
- specificFlow: false,
- flowBlockId: '',
- },
- },
- notification: {
- name: 'Notification',
- description: 'Display a notification',
- icon: 'riNotification3Line',
- editComponent: 'EditNotification',
- component: 'BlockBasic',
- category: 'general',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['message', 'title', 'iconUrl', 'imageUrl'],
- data: {
- disableBlock: false,
- description: '',
- message: '',
- iconUrl: '',
- imageUrl: '',
- title: 'Hello world!',
- },
- },
- 'log-data': {
- name: 'Get log data',
- description: 'Get the latest log data of a workflow',
- icon: 'riFileHistoryLine',
- editComponent: 'EditLogData',
- component: 'BlockBasic',
- category: 'data',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- workflowId: '',
- dataColumn: '',
- saveData: true,
- assignVariable: false,
- variableName: '',
- },
- },
- 'tab-url': {
- name: 'Get tab URL',
- description: 'Get the tab URL',
- icon: 'riLinksLine',
- editComponent: 'EditTabURL',
- component: 'BlockBasic',
- category: 'browser',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- type: 'active-tab',
- dataColumn: '',
- saveData: true,
- assignVariable: false,
- variableName: '',
- },
- },
- 'slice-variable': {
- name: 'Slice variable',
- description: 'Extracts a section of a variable value',
- icon: 'riSliceLine',
- editComponent: 'EditSliceVariable',
- component: 'BlockBasic',
- category: 'data',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- endIdxEnabled: false,
- startIdxEnabled: true,
- endIndex: 0,
- startIndex: 0,
- variableName: '',
- },
- },
- 'increase-variable': {
- name: 'Increase variable',
- description: 'Increase the value of a variable by specific amount',
- icon: 'riIncreaseDecreaseLine',
- editComponent: 'EditIncreaseVariable',
- component: 'BlockBasic',
- category: 'data',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- increaseBy: 1,
- variableName: '',
- },
- },
- 'regex-variable': {
- name: 'RegEx variable',
- description: 'Matching a variable value against a regular expression',
- icon: 'mdiRegex',
- editComponent: 'EditRegexVariable',
- component: 'BlockBasic',
- category: 'data',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['replaceVal'],
- data: {
- disableBlock: false,
- method: 'match',
- replaceVal: '',
- description: '',
- expression: '',
- flag: [],
- },
- },
- 'data-mapping': {
- name: 'Data mapping',
- description: 'Map data of a variable or table',
- icon: 'riMindMap',
- editComponent: 'EditDataMapping',
- component: 'BlockBasic',
- category: 'data',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- dataSource: 'table',
- sources: [],
- varSourceName: '',
- dataColumn: '',
- saveData: false,
- assignVariable: false,
- variableName: '',
- },
- },
- 'sort-data': {
- name: 'Sort data',
- description: 'Sort the items of data',
- icon: 'riSortAsc',
- editComponent: 'EditSortData',
- component: 'BlockBasic',
- category: 'data',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- sortByProperty: false,
- itemProperties: [],
- dataSource: 'table',
- varSourceName: '',
- dataColumn: '',
- saveData: false,
- assignVariable: false,
- variableName: '',
- },
- },
- 'create-element': {
- name: 'Create element',
- description: 'Create an element and insert it into the page',
- icon: 'riHtml5Line',
- editComponent: 'EditCreateElement',
- component: 'BlockBasic',
- category: 'interaction',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['html', 'css'],
- data: {
- disableBlock: false,
- description: '',
- javascript: '',
- html: '',
- css: '',
- preloadScripts: [],
- findBy: 'cssSelector',
- insertAt: 'after',
- runBeforeLoad: false,
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- selector: 'body',
- },
- },
- cookie: {
- name: 'Cookie',
- description: 'Get, set, or remove cookies',
- icon: 'mdiCookieOutline',
- editComponent: 'EditCookie',
- component: 'BlockBasic',
- category: 'browser',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: [
- 'domain',
- 'expirationDate',
- 'path',
- 'sameSite',
- 'name',
- 'url',
- 'value',
- ],
- data: {
- disableBlock: false,
- description: '',
- type: 'get',
- getAll: false,
- domain: '',
- expirationDate: '',
- path: '',
- sameSite: '',
- name: '',
- url: '',
- value: '',
- httpOnly: false,
- secure: false,
- session: false,
- assignVariable: false,
- variableName: '',
- saveData: true,
- dataColumn: '',
- },
- },
- };
- export const categories = {
- interaction: {
- name: 'Web interaction',
- border: 'border-green-200 dark:border-green-300',
- color: 'bg-green-200 dark:bg-green-300 fill-green-200 dark:fill-green-300',
- },
- browser: {
- name: 'Browser',
- border: 'border-orange-200 dark:border-orange-300',
- color:
- 'bg-orange-200 dark:bg-orange-300 fill-orange-200 dark:fill-orange-300',
- },
- general: {
- name: 'General',
- border: 'border-yellow-200 dark:border-yellow-300',
- color:
- 'bg-yellow-200 dark:bg-yellow-300 fill-yellow-200 dark:fill-yellow-300',
- },
- onlineServices: {
- name: 'Online services',
- border: 'border-red-200 dark:border-red-300',
- color: 'bg-red-200 dark:bg-red-300 fill-red-200 dark:fill-red-300',
- },
- data: {
- name: 'Data',
- border: 'border-lime-200 dark:border-lime-300',
- color: 'bg-lime-200 dark:bg-lime-300 fill-lime-200 dark:fill-lime-300',
- },
- conditions: {
- name: 'Conditions',
- border: 'border-blue-200 dark:border-blue-300',
- color: 'bg-blue-200 dark:bg-blue-300 fill-blue-200 dark:fill-blue-300',
- },
- };
- export const tagColors = {
- stage: 'bg-yellow-200 dark:bg-yellow-300',
- production: 'bg-green-200 dark:bg-green-300',
- };
- export const eventList = [
- { id: 'click', name: 'Click', type: 'mouse-event' },
- { id: 'dblclick', name: 'Double Click', type: 'mouse-event' },
- { id: 'mouseup', name: 'Mouseup', type: 'mouse-event' },
- { id: 'mousedown', name: 'Mousedown', type: 'mouse-event' },
- { id: 'mouseenter', name: 'Mouseenter', type: 'mouse-event' },
- { id: 'mouseleave', name: 'Mouseleave', type: 'mouse-event' },
- { id: 'mouseover', name: 'Mouseover', type: 'mouse-event' },
- { id: 'mouseout', name: 'Mouseout', type: 'mouse-event' },
- { id: 'mousemove', name: 'Mousemove', type: 'mouse-event' },
- { id: 'focus', name: 'Focus', type: 'focus-event' },
- { id: 'blur', name: 'Blur', type: 'focus-event' },
- { id: 'input', name: 'Input', type: 'input-event' },
- { id: 'change', name: 'Change', type: 'event' },
- { id: 'touchstart', name: 'Touch start', type: 'touch-event' },
- { id: 'touchend', name: 'Touch end', type: 'touch-event' },
- { id: 'touchmove', name: 'Touch move', type: 'touch-event' },
- { id: 'touchcancel', name: 'Touch cancel', type: 'touch-event' },
- { id: 'keydown', name: 'Keydown', type: 'keyboard-event' },
- { id: 'keyup', name: 'Keyup', type: 'keyboard-event' },
- { id: 'submit', name: 'Submit', type: 'submit-event' },
- { id: 'wheel', name: 'Wheel', type: 'wheel-event' },
- ];
- export const dataExportTypes = [
- { name: 'JSON', id: 'json' },
- { name: 'CSV', id: 'csv' },
- { name: 'Plain text', id: 'plain-text' },
- ];
- export const workflowCategories = {
- scrape: 'Scraping',
- automation: 'Automation',
- productivity: 'Productivity',
- };
- export const excludeOnError = [
- 'delay',
- 'webhook',
- 'trigger',
- 'while-loop',
- 'conditions',
- 'element-exists',
- ];
- export const contentTypes = [
- { name: 'application/json', value: 'json' },
- { name: 'application/x-www-form-urlencoded', value: 'form' },
- ];
- export const supportLocales = [
- { id: 'en', name: 'English' },
- { id: 'zh', name: '简体中文' },
- { id: 'zh-tw', name: '繁體中文' },
- { id: 'vi', name: 'Tiếng Việt' },
- { id: 'fr', name: 'Français' },
- ];
- export const communities = [
- {
- name: 'GitHub',
- icon: 'riGithubFill',
- url: 'https://github.com/kholid060/automa',
- },
- {
- name: 'Twitter',
- icon: 'riTwitterLine',
- url: 'https://twitter.com/AutomaApp',
- },
- {
- name: 'Discord',
- icon: 'riDiscordLine',
- url: 'https://discord.gg/C6khwwTE84',
- },
- {
- name: 'YouTube',
- icon: 'riYoutubeLine',
- url: 'https://www.youtube.com/channel/UCL3qU64hW0fsIj2vOayOQUQ',
- },
- ];
- export const elementsHighlightData = {
- selectedElements: {
- stroke: '#2563EB',
- activeStroke: '#f87171',
- fill: 'rgba(37, 99, 235, 0.1)',
- activeFill: 'rgba(248, 113, 113, 0.1)',
- },
- hoveredElements: {
- stroke: '#fbbf24',
- fill: 'rgba(251, 191, 36, 0.1)',
- },
- };
- export const conditionBuilder = {
- valueTypes: [
- {
- id: 'value',
- category: 'value',
- name: 'Value',
- compareable: true,
- data: { value: '' },
- },
- {
- id: 'code',
- category: 'value',
- name: 'Code',
- compareable: false,
- data: { code: '\nreturn true;' },
- },
- {
- id: 'element#text',
- category: 'element',
- name: 'Element text',
- compareable: true,
- data: { selector: '' },
- },
- {
- id: 'element#exists',
- category: 'element',
- name: 'Element exists',
- compareable: false,
- data: { selector: '' },
- },
- {
- id: 'element#notExists',
- category: 'element',
- name: 'Element not exists',
- compareable: false,
- data: { selector: '' },
- },
- {
- id: 'element#visible',
- category: 'element',
- name: 'Element visible',
- compareable: false,
- data: { selector: '' },
- },
- {
- id: 'element#visibleScreen',
- category: 'element',
- name: 'Element visible in screen',
- compareable: false,
- data: { selector: '' },
- },
- {
- id: 'element#invisible',
- category: 'element',
- name: 'Element hidden in screen',
- compareable: false,
- data: { selector: '' },
- },
- {
- id: 'element#attribute',
- category: 'element',
- name: 'Element attribute value',
- compareable: true,
- data: { selector: '', attrName: '' },
- },
- ],
- compareTypes: [
- { id: 'eq', name: 'Equals', needValue: true, category: 'basic' },
- {
- id: 'eqi',
- name: 'Equals (case insensitive)',
- needValue: true,
- category: 'basic',
- },
- { id: 'nq', name: 'Not equals', needValue: true, category: 'basic' },
- { id: 'gt', name: 'Greater than', needValue: true, category: 'number' },
- {
- id: 'gte',
- name: 'Greater than or equal',
- needValue: true,
- category: 'number',
- },
- { id: 'lt', name: 'Less than', needValue: true, category: 'number' },
- {
- id: 'lte',
- name: 'Less than or equal',
- needValue: true,
- category: 'number',
- },
- { id: 'cnt', name: 'Contains', needValue: true, category: 'text' },
- { id: 'nct', name: 'Not contains', needValue: true, category: 'text' },
- { id: 'stw', name: 'Starts with', needValue: true, category: 'text' },
- { id: 'enw', name: 'Ends with', needValue: true, category: 'text' },
- { id: 'rgx', name: 'Match with RegEx', needValue: true, category: 'text' },
- { id: 'itr', name: 'Is truthy', needValue: false, category: 'boolean' },
- { id: 'ifl', name: 'Is falsy', needValue: false, category: 'boolean' },
- ],
- inputTypes: {
- selector: {
- placeholder: '.class',
- label: 'CSS selector or XPath',
- },
- value: {
- label: 'Value',
- placeholder: 'abc123',
- },
- attrName: {
- label: 'Attribute name',
- placeholder: 'name',
- },
- },
- };
|