The Custom Code node enables administrators to execute Python scripts within a workflow by consuming mapped inputs and producing defined outputs. It allows implementation of custom logic, including external API interactions, and seamlessly passes results to subsequent nodes for further processing.
User Persona: Administrator
Capabilities
Provides an inbuilt code editor to write and execute Python scripts within the workflow.
Enables defining output variables that can be consumed by downstream nodes for further workflow actions.
Supports making API calls within the Python code to integrate with external systems and services.
Benefits
Integration Flexibility
Reduced Dependency on External Systems
Improved Automation
Configure Custom Code
To configure Custom Code, perform the following steps:
Navigate to the Workflow Canvas.
Drag and drop the Custom Code component to the Workflow canvas.
Double-click Custom Code.
The Custom Code section is displayed.
Figure: Custom CodeEnter the following details as described in the following sections and click Save Changes.
INPUT VARIABLE
Input variables define the data passed into the Custom Code node at runtime. These variables are mapped from workflow inputs (Start node) or outputs of preceding nodes and are used within the Python script to execute custom logic.
To add Input Variable, perform the following steps:
Click + Add Variable to add the input variable.
The Custom Code section is displayed.
Figure: Custom CodeEnter the details as described in the following table and click Save Changes.
Field
Description
Variable Name
Specifies the unique name of the input variable used within the workflow.
Variable Type
Defines how the parameter value is provided. For example, Manual Entry allows the administrator to explicitly define a static value.
Entry Type
Specifies the data type of the parameter (for example, String, Number, Boolean), which determines how the value is interpreted during condition evaluation.
Parameter Value
Defines the actual value assigned to the parameter. This value is used during workflow execution to evaluate conditions and control routing logic.
CODE LOGIC
Defines the Python script executed within the node to process inputs, perform logic (including API calls), and generate outputs for downstream use.
To add the output variable, perform the following steps:
Click + Add New Row to add the output variable in the python code.

Figure: Code LogicEnter the value in the Variable textbox and select the Data Type from the list.
Click Save to save the changes.
