### Define Bot Setup Schema Source: https://docs.robomotion.io/blog/tags/personalized Use this JSON object in the Bot Setup popup to define the required input fields and UI layout for the bot configuration screen. ```json { "schema": { "type": "object", "required": [ "outreachVideoURL", "outreachCompaniesCSV" ], "properties": { "outreachVideoURL": { "type": "string" }, "outreachCompaniesCSV": { "type": "string" }, "loomCookie": { "type": "string" } } }, "ui_schema": { "type": "VerticalLayout", "elements": [ { "type": "HorizontalLayout", "elements": [ { "type": "Control", "scope": "#/properties/outreachVideoURL" } ] }, { "type": "HorizontalLayout", "elements": [ { "type": "Control", "scope": "#/properties/outreachCompaniesCSV" } ] }, { "type": "HorizontalLayout", "elements": [ { "type": "Control", "scope": "#/properties/loomCookie" } ] } ] } } ``` -------------------------------- ### Example Home Directory Paths Source: https://docs.robomotion.io/blog/scale-personalized-outreach-videos-with-cloud-run Provides valid path formats for different operating systems to be used in the configuration node. ```text For Windows, it is "C:/Users/John/Outreach" For Linux, it is "/home/john/outreach" For Mac, it is "/Users/john/outreach" ``` -------------------------------- ### Set Home Directory Path Source: https://docs.robomotion.io/blog/tags/video Example of assigning a specific directory path to the msg.home variable for Windows. ```javascript msg.home = "C:/Users/John/Outreach" ``` -------------------------------- ### Define Bot Setup Schema Source: https://docs.robomotion.io/blog/scale-personalized-outreach-videos-with-cloud-run JSON configuration defining the required input fields for the Outreach Video Creator bot, including video URL, CSV data, and optional authentication cookies. ```json { "schema": { "type": "object", "required": [ "outreachVideoURL", "outreachCompaniesCSV" ], "properties": { "outreachVideoURL": { "type": "string" }, "outreachCompaniesCSV": { "type": "string" }, "loomCookie": { "type": "string" } } }, "ui_schema": { "type": "VerticalLayout", "elements": [ { "type": "HorizontalLayout", "elements": [ { "type": "Control", "scope": "#/properties/outreachVideoURL" } ] }, { "type": "HorizontalLayout", "elements": [ { "type": "Control", "scope": "#/properties/outreachCompaniesCSV" } ] }, { "type": "HorizontalLayout", "elements": [ { "type": "Control", "scope": "#/properties/loomCookie" } ] } ] } } ``` -------------------------------- ### Define Assistant variables in a Function node Source: https://docs.robomotion.io/blog/how-to-make-a-simple-interface-with-assistant-nodes Use this JavaScript code within a Function node named 'Setups' to initialize the assistant's header, message, and labels. ```javascript msg.header = "Robomotion Assistant"; // Enter a name for your assistant. msg.message = "How can I help you ?"; // Enter the message your assistant wants to send. msg.labels = ["Start"]; // The message you want to send to the assistant. msg.message_ = ""; // Enter the message your assistant wants to send. return msg; ``` -------------------------------- ### GET /v1/jobs.list Source: https://docs.robomotion.io/reference/api Retrieves a list of jobs available in the workspace. ```APIDOC ## GET /v1/jobs.list ### Description Retrieves a list of jobs available in the workspace. ### Method GET ### Endpoint /v1/jobs.list ``` -------------------------------- ### GET /v1/schedules.list Source: https://docs.robomotion.io/reference/api Retrieves a list of schedules available in the workspace. ```APIDOC ## GET /v1/schedules.list ### Description Retrieves a list of schedules available in the workspace. ### Method GET ### Endpoint /v1/schedules.list ``` -------------------------------- ### GET /v1/users.list Source: https://docs.robomotion.io/reference/api Retrieves a list of users available in the workspace. ```APIDOC ## GET /v1/users.list ### Description Retrieves a list of users available in the workspace. ### Method GET ### Endpoint /v1/users.list ``` -------------------------------- ### GET /v1/robots.list Source: https://docs.robomotion.io/reference/api Retrieves a list of robots available in the workspace. ```APIDOC ## GET /v1/robots.list ### Description Retrieves a list of robots available in the workspace. ### Method GET ### Endpoint /v1/robots.list ``` -------------------------------- ### GET /v1/flows.list Source: https://docs.robomotion.io/reference/api Retrieves a list of flows available in the workspace. ```APIDOC ## GET /v1/flows.list ### Description Retrieves a list of flows available in the workspace. ### Method GET ### Endpoint /v1/flows.list ``` -------------------------------- ### Accessing Variables in Function Nodes Source: https://docs.robomotion.io/reference/products/designer/variables Retrieve values from Global, Flow, or Local scopes within a Function node using the get method. ```javascript var gVar1 = global.get("var1"); // This is how you get a Global scoped variable value var fVar2 = flow.get("var2"); // This is how you get a Flow scoped variable value var lVar3 = local.get("var3"); // This is how you get a Function scoped local variable value ``` -------------------------------- ### XPath Selector for Currency Value Source: https://docs.robomotion.io/tutorials/browser-automation Use this XPath expression in the Get Value node to target the converted currency amount on the search results page. ```xpath //*[@data-value] ``` -------------------------------- ### Configure Home Directory Path Source: https://docs.robomotion.io/blog/scale-personalized-outreach-videos-with-cloud-run Sets the target directory for generated videos and output files on Windows systems. ```javascript msg.home = "C:/Users/John/Outreach" ``` -------------------------------- ### Initialize website URL variable Source: https://docs.robomotion.io/blog/tags/cap-monster-package Sets the target URL for the automation flow within a Function node. ```javascript msg.website_url = "https://www.google.com/recaptcha/api2/demo"; //The website_url variable use to aceess website. return msg; ``` -------------------------------- ### List available capture devices via FFmpeg Source: https://docs.robomotion.io/blog/tags/video Run this command in the macOS Terminal to list available capture devices and their corresponding index numbers. ```bash $HOME/.config/robomotion/packages/bin/Robomotion/FFmpeg/0.2.3/ffmpeg -f avfoundation -list_devices true -i "" ``` -------------------------------- ### List available AVFoundation capture devices Source: https://docs.robomotion.io/blog/scale-personalized-outreach-videos-with-cloud-run Execute this command in the terminal to identify the correct capture device index for your Mac. ```bash $HOME/.config/robomotion/packages/bin/Robomotion/FFmpeg/0.2.3/ffmpeg -f avfoundation -list_devices true -i "" ``` -------------------------------- ### Configure file download variables Source: https://docs.robomotion.io/blog/how-download-a-file-from-the-web Define the source file path and the destination save path within a function node. ```javascript msg.FilePath = ""; // [Required] Path to the file you want to download msg.FileDownloadPath = ""; // [Required] The path to will save the document you want to download return msg; ``` -------------------------------- ### Configure PDF download paths and URL Source: https://docs.robomotion.io/blog/how-to-auto-pdf-download-in-chrome-browser Defines the user directory, download path, and target PDF URL within a Robomotion function node. ```javascript //User Directory Path to save Chrome settings msg.user_directory_path = "YourUserDataDirFolderPath"; //Download Path to save PDF files msg.download_path = "YourDownloadFolderPath"; //Give a url for the pdf file to download msg.url = "https://www.fedex.com/content/dam/fedex/us-united-states/services/Fees_Shipping_Information.pdf"; return msg; ``` -------------------------------- ### Initialize Data Table and CSV Path Source: https://docs.robomotion.io/blog/how-to-update-data-table-rows Defines the CSV output path and the initial structure of the data table within a Function node. ```javascript msg.csv_path = "C:\\Robomotion\\Templates\\myCSV.csv"; //The path to the CSV file where the output will be saved. msg.table = { columns: ["Name", "Surname", "Age"], rows: [{ Name: 'Jack', Surname: 'Smith', Age: 21 }, { Name: 'Harry', Surname: '', Age: 30 }, { Name: 'Charlie', Surname: '', Age: 50 } ] }; return msg; ``` -------------------------------- ### For Each Loop Flow Configuration Source: https://docs.robomotion.io/reference/products/designer/for-each Copy this JSON structure and paste it into your flow board to test the For Each loop implementation. ```json {"nodes":[{"id":"0533a62b-2dd4-42b5-a095-84bdeb58da3b","type":"simple","selected":true,"x":480,"y":390,"extras":{"inPayload":{"scope":"JS","name":"Date.now()"},"outPayload":{"scope":"Message","name":"payload"},"optRepeat":1,"optOnce":true,"optOnceDelay":0.1},"ports":[{"id":"5c3d76d2-1de3-4a4d-92fc-0344c87f07f8","type":"default","selected":false,"name":"out_5c3d76d2-1de3-4a4d-92fc-0344c87f07f8","parentNode":"0533a62b-2dd4-42b5-a095-84bdeb58da3b","links":["9bf51ff1-6aff-41a8-a024-cb201d3dbccc"],"in":false,"label":"simple","position":"out"}],"model":{"id":"0533a62b-2dd4-42b5-a095-84bdeb58da3b","name":"Start","icon":"M10,9A1,1 0 0,1 11,8A1,1 0 0,1 12,9V13.47L13.21,13.6L18.15,15.79C18.68,16.03 19,16.56 19,17.14V21.5C18.97,22.32 18.32,22.97 17.5,23H11C10.62,23 10.26,22.85 10,22.57L5.1,18.37L5.84,17.6C6.03,17.39 6.3,17.28 6.58,17.28H6.8L10,19V9M11,5A4,4 0 0,1 15,9C15,10.5 14.2,11.77 13,12.46V11.24C13.61,10.69 14,9.89 14,9A3,3 0 0,0 11,6A3,3 0 0,0 8,9C8,9.89 8.39,10.69 9,11.24V12.46C7.8,11.77 7,10.5 7,9A4,4 0 0,1 11,5Z","color":"#FDD835","namespace":"Core.Trigger.Inject","version":"0.0.0","abc":[{"name":"Start","color":"#FDD835","version":"0.0.0"},{"inPayload":{"scope":"JS","name":"Date.now()"}},{"outPayload":{"scope":"Message","name":"payload"}},{"optRepeat":1,"optOnce":true,"optOnceDelay":0.1}],"xyz":[{"schema":{"title":"Input","type":"object","properties":{"inPayload":{"type":"object","title":"Payload","variableType":"String","customScope":true,"jsScope":true,"argsScope":true,"properties":{"scope":{"type":"string"},"name":{"type":"string"}}}}},"uiSchema":{"inPayload":{"ui:field":"variable"}},"formData":{"inPayload":{"scope":"JS","name":"Date.now()"}}},{"schema":{"title":"Output","type":"object","properties":{"outPayload":{"type":"object","title":"Payload","variableType":"String","messageOnly":true,"properties":{"scope":{"type":"string"},"name":{"type":"string"}}}}},"uiSchema":{"outPayload":{"ui:field":"variable"}},"formData":{"outPayload":{"scope":"Message","name":"payload"}}},{"schema":{"title":"Options","type":"object","properties":{"optRepeat":{"title":"Repeat Interval (sec)","type":"number"},"optOnce":{"title":"Once","type":"boolean"},"optOnceDelay":{"title":"Once Delay (sec)","type":"number"}}},"uiSchema":{"ui:order":["optRepeat","optOnceDelay","optOnce"],"optRepeat":{"ui:field":"input"},"optOnce":{"ui:field":"input"},"optOnceDelay":{"ui:field":"input"}},"formData":{"optRepeat":1,"optOnce":true,"optOnceDelay":0.1}}],"outputs":1,"inputs":0}},{"id":"298aaf7e-4dc5-49f3-a9aa-a7c049f60093","type":"simple","selected":true,"x":750,"y":390,"extras":{"outputs":1,"func":"msg.fruits=[\"Apple\", \"Orange\", \"Banana\"];\nreturn msg;\n","optTimeout":30,"variables":[]},"ports":[{"id":"b5806375-74ad-41fc-b682-8c33bceab9d1","type":"default","selected":false,"name":"out_b5806375-74ad-41fc-b682-8c33bceab9d1","parentNode":"298aaf7e-4dc5-49f3-a9aa-a7c049f60093","links":["4d1d03c6-6a44-4b60-97a6-e90d3ac02973"],"in":false,"label":"simple","position":"out"},{"id":"7dc5839a-3b96-48c8-add3-8f26938d55a4","type":"default","selected":false,"name":"in","parentNode":"298aaf7e-4dc5-49f3-a9aa-a7c049f60093","links":["9bf51ff1-6aff-41a8-a024-cb201d3dbccc"],"in":true,"label":"simple","position":"in"}],"model":{"id":"298aaf7e-4dc5-49f3-a9aa-a7c049f60093","name":"Prepare Array","icon":"M15.6,5.29C14.5,5.19 13.53,6 13.43,7.11L13.18,10H16V12H13L12.56,17.07C12.37,19.27 10.43,20.9 8.23,20.7C6.92,20.59 5.82,19.86 5.17,18.83L6.67,17.33C6.91,18.07 7.57,18.64 8.4,18.71C9.5,18.81 10.47,18 10.57,16.89L11,12H8V10H11.17L11.44,6.93C11.63,4.73 13.57,3.1 15.77,3.3C17.08,3.41 18.18,4.14 18.83,5.17L17.33,6.67C17.09,5.93 16.43,5.36 15.6,5.29Z","color":"#F27925","editor":"javascript","namespace":"Core.Programming.Function","version":"0.0.0","abc":[{"name":"Prepare Array","version":"0.0.0","color":"#F27925","delayBefore":0,"delayAfter":0,"continueOnError":false},{"outputs":1,"func":"msg.fruits=[\"Apple\", \"Orange\", \"Banana\"];\nreturn ``` -------------------------------- ### Create SQLite Table Source: https://docs.robomotion.io/blog/how-to-insert-date-time-into-sqlite Defines a table schema with TEXT and DATETIME column types. ```sql CREATE TABLE IF NOT EXISTS 'products' ( 'productTitle' TEXT, -- Column Type TEXT, 'orderDate' DATETIME, 'deliveryDate' DATETIME ); ``` -------------------------------- ### Configure Blog Post Variables in JavaScript Source: https://docs.robomotion.io/blog/how-to-write-automaticbog-posts-using-openai Defines the necessary variables for blog topic, prompts, and WordPress integration within a Robomotion function node. ```javascript msg.title = "Climate change jeopardizes sustainable development."; //[Required] Topic of the blog post. msg.prompt = "Write a blog post covering this topic, not exceeding 4 paragraphs: " + msg.title; msg.prompt_ = "Natural events caused by climate change."; //[Required] Converts typed text into a realistic image. msg.negative_prompt = "Drought, flood, global warming, thirst."; //[Required] Converts typed text into a realistic image. msg.image_path = ""; //[Required] File path from which the image was downloaded. msg.wordpress_url = ""; //[Required] Your WordPress link. return msg; ``` -------------------------------- ### Define Input Values Source: https://docs.robomotion.io/blog/how-to-insert-date-time-into-sqlite Assigns product and date values to the message object for database insertion. ```javascript msg.productTitle = "Pencil"; msg.orderDate = "2023-07-01"; msg.deliveryDate = "03.07.2023"; return msg; ``` -------------------------------- ### Update Flow Configuration for App Input Source: https://docs.robomotion.io/blog/scale-personalized-outreach-videos-with-cloud-run Replace hard-coded configuration values with dynamic inputs from the App In node to enable parameterization. ```javascript // Pre-recorded outreach video msg.video_url = msg.in.payload.config.outreachVideoURL; // Prepared CSV company list msg.csv_url = msg.in.payload.config.outreachCompaniesCSV; // Loom Cookie (OPTIONAL) msg.loom_cookie = msg.in.payload.config.loomCookie; // Home Folder msg.home = global.get("$Home$"); ``` -------------------------------- ### Configure SQLite Connection Path Source: https://docs.robomotion.io/blog/how-to-insert-date-time-into-sqlite Sets the database file path and connection string within a Function node. ```javascript msg.dbFile = global.get("$Home$") + "/Desktop/data.db"; msg.dbConnStr = "Data Source=" + msg.dbFile + ";Version=3;"; return msg; ``` -------------------------------- ### Initialize Flow Variables in Function Node Source: https://docs.robomotion.io/blog/page/3 Defines the Excel file path and initializes an empty array within a Function node to prepare data for the flow. ```javascript //Excel Path of Data Table msg.excel_path = "YourDataTableExcelPath"; //Defining Array msg.array = []; return msg; ``` -------------------------------- ### Configure recording input index Source: https://docs.robomotion.io/blog/scale-personalized-outreach-videos-with-cloud-run Update the recording input index in your flow based on the device number identified from the FFmpeg output. ```javascript msg.recording_input = "2"; ``` ```javascript msg.recording_input = "3"; ``` -------------------------------- ### Initialize Array in Function Node Source: https://docs.robomotion.io/blog/how-to-use-for-each-node Use this code within a 'Function' node to define an array of URLs for subsequent iteration. ```javascript msg.arr = ["https://forum.uipath.com/t/new-for-each/480760", "https://www.robomotion.io/", "https://explore.robomotion.io/"]; return msg; ``` -------------------------------- ### Inject reCAPTCHA solution into the browser Source: https://docs.robomotion.io/blog/how-to-use-solve-recaptcha-v2-nodes Use this script to set the gRecaptchaResponse value in the DOM after receiving a successful solution from the Cap Monster node. ```javascript var textarea = document.querySelector("#g-recaptcha-response"); textarea.value = msg.response.solution.gRecaptchaResponse; ``` -------------------------------- ### Set Excel Properties Function Node Source: https://docs.robomotion.io/blog/page/3 Initializes the file path and column names required for the Excel automation flow. ```javascript msg.excel_path = ""; // Give the excel path here msg.ColumnName1 = [""]; // Give the column name here msg.ColumnName2 = [""]; // Give the column name here /* Note!! Each insert column node is used to insert a column. The variables msg.ColumnData1 and msg.ColumnData2 are the column names to be added. */ return msg; ``` -------------------------------- ### Construct Google Search URL in Function Node Source: https://docs.robomotion.io/tutorials/browser-automation This script processes the input amount to generate a dynamic Google search URL for currency conversion. ```javascript var q = msg.amount + "+dollar+to+euro"; msg.link = "https://www.google.com/search?q=" + q; return msg; ``` -------------------------------- ### Configure DOM Parser variables Source: https://docs.robomotion.io/blog/how-to-using-dom-parser-package Define the target URL, CSS selector, and HTML tag within a function node to prepare data for the DOM Parser. ```javascript msg.link = "https://docs.robomotion.io/tutorials/"; //[Required] Type the link you want to go to. msg.css_selector = "[class='theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item']"; //[Required] Write Css Selector for the section you want to take on the page. msg.tag = "a"; //[Required] Write the tag of the selector you get. return msg; ``` -------------------------------- ### Initialize JSON Data in Function Node Source: https://docs.robomotion.io/blog/page/3 Use this code within a Function node to define the JSON object structure that will be converted into a Data Table. ```javascript msg.data = [{ 'productID': "123456", 'productSize': "S", 'productColor': "Green", 'productPrice': 25.50, 'productProperties': "Viscon" }, { 'productID': "123457", 'productSize': "M", 'productColor': "Blue", 'productPrice': 30.00, 'productProperties': "Cotton" }, { 'productID': "123458", 'productSize': "M", 'productColor': "Red", 'productPrice': 50.00, 'productProperties': "Cotton" } ] return msg; ``` -------------------------------- ### Initialize try count variable Source: https://docs.robomotion.io/blog/how-to-use-the-try-catch-tructure Sets the initial retry counter to zero before entering the error handling loop. ```javascript msg.try_count = 0; return msg; ``` -------------------------------- ### Define file path variable Source: https://docs.robomotion.io/blog/how-to-use-the-try-catch-tructure Sets the target file path in the msg object for the Path Exists node. ```javascript msg.filePath = "C:\\Robomotion\\Templates\\myText.txt"; // The directory of the folder to be checked for files should be given return msg; ``` -------------------------------- ### Generate Google Drive Direct Download URL Source: https://docs.robomotion.io/blog/scale-personalized-outreach-videos-with-cloud-run Use this template to convert a standard Google Drive share link into a direct download URL by replacing the placeholder with the file ID. ```text https://drive.google.com/uc?export=download&id=PLACEHOLDER_REPLACE_WITH_YOUR_ID ``` ```text https://drive.google.com/uc?export=download&id=1Nirl6-EzCcT3PXzGLt25OKZVYDaFz9-r ``` -------------------------------- ### Set Excel Properties Function Node Source: https://docs.robomotion.io/blog/page/3 Initializes the Excel file path and the name of the new column to be added within the flow. ```javascript msg.excel_path = ""; // Give the excel path here msg.lastColumnData = [""]; // Give the column name here /* Note!! Each insert column node is used to insert a column. The variable msg.lastColumnData is the column name to be added. */ return msg; ``` -------------------------------- ### Initial Message Object Structure Source: https://docs.robomotion.io/reference/products/designer/message-object The default structure of a message object injected by an Inject node. ```json { id: "twou796nwbdy9bpmbw7e15yxia", payload: 1634730234524 } ``` -------------------------------- ### Define website URL in Function node Source: https://docs.robomotion.io/blog/how-to-use-solve-recaptcha-v2-nodes Sets the target URL for the reCAPTCHA demo in a message object variable. ```javascript msg.website_url = "https://www.google.com/recaptcha/api2/demo"; //The website_url variable use to aceess website. return msg; ``` -------------------------------- ### Define queue items in a Function node Source: https://docs.robomotion.io/blog/how-to-add-data-to-the-queue Use a Function node to define objects as properties of the message object before passing them to the 'Add Item' node. ```javascript msg.item1 = { 'name': 'item1' } msg.item2 = { 'name': 'item2' } msg.item3 = { 'name': 'item3' } return msg; ``` -------------------------------- ### Define file content in Function node Source: https://docs.robomotion.io/blog/how-to-use-file-system-nodes Sets the text content to be written into a file if the source file does not exist. ```javascript msg.text = "This place should be given text."; // The text to be written in the file should be given return msg; ``` -------------------------------- ### Define ChatGPT Prompt in Function Node Source: https://docs.robomotion.io/blog/how-to-Use-ChatGPT-node-in-Robomotion Sets the prompt variable within the message object for the ChatGPT node to process. ```javascript msg.askGPT = "How to identify SSL Certificate in a specific domain"; return msg; ``` -------------------------------- ### Configure Slack Message Payload Source: https://docs.robomotion.io/blog/page/2 Sets the message content, target channel, and webhook URL for Slack integration. ```javascript msg.SendMessage = "Hello"; //[Required] Type the message you want to send. msg.TextMessage = msg.SendMessage; msg.ChannelName = ""; //[Required] Type the channel name. msg.webhook = ""; //[Required] Enter your Slack channel webhook. msg.req = { "payload": "{\"text\":\"" + msg.TextMessage + "\"}", }; return msg; ``` -------------------------------- ### Configure Input Text for Token Classification Source: https://docs.robomotion.io/blog/how-to-token-classification-using-huggingface-package Defines the input text variable within a Robomotion Function node to be processed by the Hugging Face package. ```javascript msg.text = "I have a 3pm meeting with Melissa today at Paris."; //[Required] Type the text you want to classify. return msg; ``` -------------------------------- ### Trigger error on missing file Source: https://docs.robomotion.io/blog/how-to-use-the-try-catch-tructure Throws an error message when the file path is not found, triggering the Catch node. ```javascript throw "The file you defined in msg.sourcePath was not found." return msg; ``` -------------------------------- ### Define file path variables in Function node Source: https://docs.robomotion.io/blog/how-to-use-file-system-nodes Sets the source file path and destination directory paths for subsequent file operations. ```javascript msg.filePath = "C:\\Robomotion\\Templates\\myText1.txt"; // The directory of the folder to be checked for files should be given msg.destinationDir = "C:\\Robomotion\\Templates\\Copy\\"; // The directory of the destination folder to be copied must be given msg.destinationPath = "C:\\Robomotion\\Templates\\Copy\\myText1.txt"; // The directory of the destination file to be copied must be given ``` -------------------------------- ### Configure Slack message variables Source: https://docs.robomotion.io/blog/how-to-send-a-message-to-a-channel-from-the-slack-app Defines the message content, channel name, and webhook URL within a function node to prepare the payload for the Slack API. ```javascript msg.SendMessage = "Hello"; //[Required] Type the message you want to send. msg.TextMessage = msg.SendMessage; msg.ChannelName = ""; //[Required] Type the channel name. msg.webhook = ""; //[Required] Enter your Slack channel webhook. msg.req = { "payload": "{\"text\":\"" + msg.TextMessage + "\"}", }; return msg; ``` -------------------------------- ### Prepare Column Function Node Source: https://docs.robomotion.io/blog/page/3 Maps the length of the existing row to an Excel column letter. Ensure the array includes all necessary column identifiers if the spreadsheet exceeds the A-Z range. ```javascript var array = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; var len = msg.len; msg.lastColumn = array[len] return msg; ``` -------------------------------- ### Configure Excel File Path in Function Node Source: https://docs.robomotion.io/blog/page/3 Sets the file path for the Excel document within a function node to be used by subsequent Excel nodes. ```javascript msg.excel_path = "C:\\excel_name.xlsx"; return msg ``` -------------------------------- ### Split text into lines using regex Source: https://docs.robomotion.io/blog/tags/filesystem Use this code within a Function node to split the input text into an array of lines based on line break characters. ```javascript msg.lines = msg.text.split(/\r?\n/); return msg; ``` -------------------------------- ### Generate Google Search URL for Stock Price Source: https://docs.robomotion.io/tutorials/excel-automation This JavaScript snippet constructs a search URL by appending the stock symbol to a Google search query. ```javascript var q = msg.stock.symbol + "+stock+price"; msg.link = "https://www.google.com/search?q=" + q; return msg; ``` -------------------------------- ### Configure Default Instance ID in FlutterFlow Source: https://docs.robomotion.io/blog/tags/ai Uncomment and set the instanceID parameter in the robomotion.connect function within the Custom Action to enable direct URL access without query parameters. ```dart robomotion.connect( // instanceID: "YOUR_INSTANCE_ID", ); ``` -------------------------------- ### Insert Data with Date Formatting Source: https://docs.robomotion.io/blog/how-to-insert-date-time-into-sqlite Executes an INSERT statement that transforms a DD.MM.YYYY date string into YYYY-MM-DD format using SQLite's substr function. ```sql INSERT INTO products (productTitle, orderDate, deliveryDate) VALUES('{{productTitle}}', '{{orderDate}}', substr('{{deliveryDate}}', 7, 4)||'-'||substr('{{deliveryDate}}', 4,2)||'-'||substr('{{deliveryDate}}', 1,2)); ``` -------------------------------- ### Setting Variables in Function Nodes Source: https://docs.robomotion.io/reference/products/designer/variables Assign values to Global, Flow, or Local scopes within a Function node using the set method. ```javascript global.set("var1", 1); // This is how you assign a value to a Global scoped variable flow.set("var2", "test"); // This is how you assign a value to a Flow scoped variable local.set("var3", 1.35); // This is how you assign a value to a Function scoped local variable ``` -------------------------------- ### Define Data Tables in Function Node Source: https://docs.robomotion.io/blog/page/3 Initializes two separate data table objects within a function node to be used as input for the Merge Table operation. ```javascript msg.table_one = { columns: ["Name", "Surname", "Age"], rows: [{ Name: 'Jack', Surname: 'Smith', Age: 21 }, { Name: 'Harry', Surname: 'Brown', Age: 30 }, { Name: 'Charlie', Surname: 'Wilson', Age: 50 } ] }; msg.table_two = { columns: ["City"], rows: [{ City: 'Brighton' }, { City: 'Oxford' }, { City: 'Liverpool' } ] }; return msg; ``` -------------------------------- ### Define CSV Data Structure Source: https://docs.robomotion.io/tutorials/create-csv Sets the table object containing columns and rows within the message payload for the CSV nodes. ```javascript msg.table = { columns:["model", "year", "price"], rows:[ {"model":"hyundai", "year":1929, "price":"$4.9"}, {"model":"bmw", "year":1980, "price":"$9.9"} ] } return msg; ``` -------------------------------- ### Updated Message Object Structure Source: https://docs.robomotion.io/reference/products/designer/message-object The resulting structure of the message object after adding the isUpdated field. ```json { id: "twou796nwbdy9bpmbw7e15yxia", payload: 1634730234524, isUpdated: true; } ``` -------------------------------- ### Increment retry counter Source: https://docs.robomotion.io/blog/how-to-use-the-try-catch-tructure Increments the msg.try_count variable by 1 each time an error is caught. ```javascript msg.try_count += 1; return msg; ``` -------------------------------- ### XPath Selector for Google Stock Price Source: https://docs.robomotion.io/tutorials/excel-automation This XPath expression targets the specific element containing the stock price on a Google search results page. ```xpath //div[@data-attrid="Price"]/span[1]/span/span[1] ``` -------------------------------- ### Manipulate Message Object in Function Node Source: https://docs.robomotion.io/reference/products/designer/message-object Use this script in a Function node to add a new field to the message object. ```javascript msg.isUpdated = true; return msg; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.