SCRIPT
Run a sandboxed script.
What it does
Run a sandboxed script.
Inputs & outputs
| Input handle |
|---|
| None |
| Output handle |
|---|
| None |
Configuration
No configuration.
Example
How it works
SCRIPT runs a user-authored JavaScript snippet inside an isolated VM sandbox. The executor transpiles the script via the Script module, executes it with the node's input as context, and returns whatever the script resolves. The full input object is available inside the script, and the return value is passed downstream. When run inside a live Workflow job, execution is logged as a Job action so you can inspect inputs and outputs from the Jobs view.
Example
Scenario: A Workflow needs to compute the number of days until a contract renewal date.
const renewal = new Date(input.renewalDate);
const today = new Date();
const diffMs = renewal - today;
return { daysUntilRenewal: Math.ceil(diffMs / (1000 * 60 * 60 * 24)) };Wire renewalDate from an upstream HTTP_REQUEST into the SCRIPT input. The daysUntilRenewal output can then feed a NUMBER_CONDITION node to branch on whether renewal is within 30 days.