Custom Code Node

In the Code Node, users can execute custom javascript code within the workflow. This provides flexibility to perform complex computations, data manipulations, or integrate custom logic.

Adding and Configuring a Code Node

  1. Find the spot in your workflow where you need the custom code execution to occur.

  2. Choose the Code Node from the 'Add Node' panel and place it on the workflow canvas.

Configuration Tabs for Code Node

Input Params Tab

This is where you specify any input parameters your code needs.

  • Select Language:

    • Choose the scripting or programming language you will use. In the screenshot, JavaScript is selected, which is commonly supported in workflow tools.

  • Add Query/Code:

    • Write or paste your code in the provided code editor. You can incorporate workflow data using tokens, such as {{Trigger.item_no[0]}}, which would access data from the workflow trigger.

Test Results Tab

After coding, you can test the script to ensure it executes as expected within the workflow context.

  • Testing the Code:

    • Provide necessary inputs if your code requires them, and click the 'Test' button. This will execute the script within a controlled environment and return the results.

  • Interpreting the Output:

    • The output from the execution of your code will be displayed in JSON format, allowing you to validate the results of your script.

Settings Tab

Adjust the execution settings for your code within the workflow.

  • Runtime Settings:

    • Here, you might find options to configure timeout settings, memory allocation, or other runtime constraints specific to code execution.

Last updated