Who This Is For / When to Use
Use Custom Code when a workflow requires logic or integrations that cannot be achieved using standard workflow actions.
What the Custom Code Action Does
The Custom Code action executes JavaScript in an asynchronous environment and returns structured output that can be used by subsequent workflow steps.
Add the Custom Code Action
Open the workflow editor.
Click Add Action.
Search for Custom Code and select it.
[Screenshot: unnamed (32).png]
Configure the Action
Action Name
Set a clear name to identify the purpose of the code step.
Language
JavaScript is the supported language for Custom Code actions.
Add Properties (Input Data)
Properties allow you to pass values from previous triggers or actions into your code.
In Property to include in code, enter a key name.
Map the value using workflow variables.
Access values in code using
inputData.keyName.
Write Code
The code editor runs inside an async function and supports await.
Output must be a JavaScript object or an array of objects.
Assign the final result to
output.
Example structure:
Read values from
inputData.Perform logic or calculations.
Set the
outputobject.
Build with AI
You can generate JavaScript automatically using AI.
Click Build with AI.
Describe the logic you need.
Click Generate.
Review and insert the generated code.
Make External HTTP Requests
Custom Code supports outbound HTTP requests.
Click HTTP Requests above the editor.
Select a request method.
The request template is added to the code editor.
Supported methods:
GET
POST
PUT
PATCH
DELETE
HEAD
OPTIONS
Test Your Code (Required)
Testing is mandatory before the action can be used in a workflow.
Click Test Your Code.
Provide optional test input.
Run the test.
Review the response and console output.
View Console Logs
Console output from console.log() statements appears during test execution and helps debug logic.
Reference Output
The Reference Output section shows the structure of the returned data available to later workflow steps.
Save the Action
After successful testing, click Save Action to activate the Custom Code step in the workflow.
Common Issues and Fixes
Code Cannot Be Saved
Ensure the code is tested successfully.
Confirm
outputis a JavaScript object or array.
Missing Input Values
Verify properties are mapped correctly.
Use the correct
inputData.keyNamereference.
Workflow Delays
Long-running external API calls can slow execution.
Use async logic efficiently.
Important Notes
Custom values are not passed during testing; only contact data is available.
Untested code cannot pass output to subsequent actions.
All console logs are captured during test runs.









