This article explains the Code Workflow Node, which allows you to integrate custom JavaScript into workflows. It provides advanced functionality to handle complex logic, calculations, data processing, and external API calls, expanding the automation capabilities of your workflows. Learn more about using workflows in Clappia here.
Click on the node and start editing on the panel that appears on the right side.
This is the name that appears in the Workflow on the left side. If there are multiple Code Workflow Nodes in the workflow, set different step names like Get Address.
After saving, the Code Workflow Node generates a unique Variable Name (e.g., {code_1}), which holds the output generated by the code. This variable can be used in subsequent workflow nodes to reference the custom JavaScript output directly. Learn more about using variables in workflows here.
The Code section is where you write custom JavaScript. Upon adding the code workflow node, a sample function appears as follows:
In this example:
This example code can be removed and a custom java script code according to your requirement can be added here.
The Output Field is where you define which outputs from the code will be available as variables for use in other blocks. Each key in the output object represents a variable. For example, in the above code, if you define the output field as sum, the app will recognize sum as a variable that can be used in other blocks.
You can add multiple output fields by clicking on ‘Add another field’ and entering their names one by one:
These output variables can then be pulled into other nodes, such as the Email Node or Create Submission Node, for further actions.
Once the output fields are defined, the values can be referenced in other nodes:
To pull up any of the output variables from the Code workflow node, type in @ followed by the name of the node (if you haven’t changed the name, it will be code). You will see the output labels. Select the ones needed to pull up the output dynamically.
The Code Workflow Node introduces advanced capabilities to Clappia workflows, enabling dynamic, JavaScript-powered automation that enhances data handling, custom logic, and integrations.
L374, 1st Floor, 5th Main Rd, Sector 6, HSR Layout, Bengaluru, Karnataka 560102, India
+91 96418 61031
3500 S DuPont Hwy, Dover,
Kent 19901, Delaware, USA
+1 (341) 209-1116
3500 S DuPont Hwy, Dover,
Kent 19901, Delaware, USA
+1 (341) 209-1116
L374, 1st Floor, 5th Main Rd, Sector 6, HSR Layout, Bengaluru, Karnataka 560102, India
+91 96418 61031