12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667 |
- 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: '',
- insertAllVars: false,
- },
- },
- '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', 'userAgent'],
- 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', 'tabTitle'],
- data: {
- disableBlock: false,
- description: '',
- url: '',
- tabIndex: 0,
- tabTitle: '',
- 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', 'selector'],
- 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,
- useTextContent: 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', 'delay'],
- 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: 'conditions',
- inputs: 1,
- outputs: 2,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: ['repeatFor'],
- 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,
- context: 'website',
- 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: {
- description: '',
- 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: 'conditions',
- 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: 'conditions',
- 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: '',
- reverseLoop: false,
- elementSelector: '',
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- resumeLastWorkflow: false,
- loopThrough: 'data-columns',
- },
- },
- 'loop-elements': {
- name: 'Loop elements',
- icon: 'riRestartLine',
- component: 'BlockBasic',
- editComponent: 'EditLoopElements',
- category: 'conditions',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- refDataKeys: [
- 'maxLoop',
- 'variableName',
- 'elementSelector',
- 'actionElSelector',
- ],
- autocomplete: ['loopId'],
- data: {
- disableBlock: false,
- loopId: '',
- selector: '',
- maxLoop: '0',
- description: '',
- reverseLoop: false,
- actionElSelector: '',
- findBy: 'cssSelector',
- actionElMaxWaitTime: 5,
- actionPageMaxWaitTime: 10,
- loadMoreAction: 'none',
- scrollToBottom: true,
- waitForSelector: false,
- waitSelectorTimeout: 5000,
- },
- },
- 'loop-breakpoint': {
- name: 'Loop breakpoint',
- description: 'To tell where loop data must stop',
- icon: 'riStopLine',
- component: 'BlockLoopBreakpoint',
- category: 'conditions',
- disableEdit: true,
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- loopId: '',
- clearLoop: false,
- },
- },
- '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', 'keysToPress'],
- data: {
- disableBlock: false,
- keys: '',
- selector: '',
- description: '',
- keysToPress: '',
- action: 'press-key',
- },
- },
- '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', 'selector'],
- 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: '',
- },
- },
- 'block-package': {
- name: 'Block package',
- description: 'Block package',
- icon: 'riHtml5Line',
- editComponent: 'EditPackage',
- component: 'BlockPackage',
- category: 'package',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {},
- },
- note: {
- name: 'Note',
- description: '',
- icon: 'riFileEditLine',
- component: 'BlockNote',
- category: 'general',
- disableEdit: true,
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- note: '',
- drawing: false,
- width: 280,
- height: 168,
- color: 'white',
- fontSize: 'regular',
- },
- },
- 'workflow-state': {
- name: 'Workflow State',
- description: 'Manage workflows states',
- icon: 'riSettings3Line',
- component: 'BlockBasic',
- editComponent: 'EditWorkflowState',
- category: 'general',
- inputs: 1,
- outputs: 1,
- allowedInputs: true,
- maxConnection: 1,
- data: {
- disableBlock: false,
- description: '',
- type: 'stop-current',
- exceptCurrent: false,
- workflowsToStop: [],
- },
- },
- 'parameter-prompt': {
- name: 'Parameter prompt',
- description: '',
- icon: 'riCommandLine',
- component: 'BlockBasic',
- category: 'general',
- editComponent: 'EditParameterPrompt',
- inputs: 1,
- outputs: 1,
- maxConnection: 1,
- allowedInputs: true,
- data: {
- disableBlock: false,
- description: '',
- timeout: 60000,
- parameters: [],
- },
- },
- };
- 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: 'Control flow',
- border: 'border-blue-200 dark:border-blue-300',
- color: 'bg-blue-200 dark:bg-blue-300 fill-blue-200 dark:fill-blue-300',
- },
- package: {
- name: 'Packages',
- border: 'border-cyan-200 dark:border-cyan-300',
- color: 'bg-cyan-200 dark:bg-cyan-300 fill-cyan-200 dark:fill-cyan-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 = [
- 'note',
- 'delay',
- 'webhook',
- 'trigger',
- 'while-loop',
- 'conditions',
- 'block-package',
- 'element-exists',
- ];
- export const contentTypes = [
- { name: 'text/plain', value: 'text' },
- { name: 'application/json', value: 'json' },
- { name: 'multipart/form-data', value: 'form-data' },
- { 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 excludeGroupBlocks = [
- 'trigger',
- 'repeat-task',
- 'loop-data',
- 'loop-breakpoint',
- 'blocks-group',
- 'conditions',
- 'webhook',
- 'element-exists',
- 'while-loop',
- 'block-package',
- ];
- 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;', context: 'background' },
- },
- {
- id: 'data#exists',
- category: 'value',
- name: 'Data exists',
- compareable: false,
- valueKey: 'dataPath',
- data: { dataPath: '' },
- },
- {
- 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: 'cni',
- name: 'Contains (case insensitive)',
- needValue: true,
- category: 'text',
- },
- { id: 'nct', name: 'Not contains', needValue: true, category: 'text' },
- {
- id: 'nci',
- name: 'Not contains (case insensitive)',
- 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',
- },
- dataPath: {
- label: 'variables@variableName',
- placeholder: '',
- },
- },
- };
|