Script
Routes the flow on what a script returns. Reach for it only when the logic cannot be expressed with an Expression condition—a computed comparison, a check across several fields at once. Routes to true when the script returns a truthy value, otherwise to false.
Fields
| Field | Description |
|---|---|
| Language | The language the script is written in. Choosing JavaScript reveals its Script field, holding the source. |
| Script | The source code. Checked for syntax errors as you type. |
As with the Script action, the source is needed to run, not to save: left empty, the step shows a needs-attention note rather than blocking the save—see Building automations. At run time, an empty script fails the step.
What the script can read
The same two values as the Script action:
payload—the output of the step immediately before this one.input—the values you mapped into the step on its Input tab.
A returned value of null, false, zero, an empty string, or an empty collection routes to false. Anything else routes to true.
What later steps see
The incoming payload, passed through unchanged on whichever path was chosen. A script condition decides a route; it does not contribute a value of its own.
Limits
The same sandbox and the same ceilings as the Script action.