Condition node
The Condition node allows creating conditional branches in your workflow.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Condition | JavaScript expression | ✅ | — | Expression that must return true or false to choose the branch. |
Condition
Define the condition to evaluate:
- Format: pure JavaScript with an explicit
return - Access the context via
context(anddatafor the trigger data) - Returns
trueorfalse
Condition examples:
// Simple comparison
return context.status === "active";
// Numeric comparison
return context.order.amount > 100;
// Existence check
return context.user.email !== undefined;
// Complex condition
return context.order.status === "pending" && context.order.amount > 50;
The condition is written in pure JavaScript: use return context.myVariable === 'ok';, not the Handlebars {{ }} syntax.
Available operators
- Comparison:
===,!==,==,!=,>,<,>=,<= - Logic:
&&(AND),||(OR),!(NOT) - Check:
!== undefined,!== null,=== ""
Input
The node evaluates the condition against the workflow context data: context for the results of the previous nodes, data for the trigger data.
Output
The node produces no value in the context: it routes the execution to one of the two branches.
- "True" branch: executed if the condition is true
- "False" branch: executed if the condition is false
Both branches can join again later in the workflow.
Example
The node is used to:
- Execute different branches according to a condition
- Filter data
- Implement conditional logic
- Create dynamic workflows
Example 1: Simple check
Condition:
return context.data.amount > 100;
Result:
- If the amount is > 100: "True" branch (premium processing)
- Otherwise: "False" branch (standard processing)
Example 2: Status check
Condition:
return context.order.status === "pending";
Result:
- If the status is "pending": "True" branch (process the order)
- Otherwise: "False" branch (ignore)
Example 3: Complex condition
Condition:
return context.user.role === "admin" && context.order.amount > 1000;
Result:
- If the user is admin AND the amount is > 1000: "True" branch (manual validation)
- Otherwise: "False" branch (automatic processing)
Common use cases
Data filtering — filter the data before processing:
return context.item.status === "active";
Validation — validate the data before processing:
return context.order.items.length > 0 && context.order.amount > 0;
Conditional routing — route to different processing:
return context.user.plan === "premium";