condition node provides if/else-if/else branching. It evaluates conditions in order and executes the first matching branch.
Configuration
Config Fields
| Field | Type | Required | Description |
|---|---|---|---|
conditions | array | Yes | Array of condition objects |
conditions[].if | string | Yes | Boolean expression to evaluate |
conditions[].then | string[] | Yes | Node IDs to execute if condition is true |
else | string[] | No | Node IDs to execute if no condition matches |
Expression Syntax
Conditions use template expressions that evaluate to boolean values.Comparison Operators
| Operator | Description | Example |
|---|---|---|
== | Equal | {{status}} == "active" |
!= | Not equal | {{status}} != "deleted" |
> | Greater than | {{amount}} > 100 |
< | Less than | {{count}} < 10 |
>= | Greater or equal | {{age}} >= 18 |
<= | Less or equal | {{score}} <= 100 |
Comparison Type Detection
The executor automatically detects value types for comparison:| Type | Detection | Example |
|---|---|---|
| Numbers | Both values are numeric | {{amount}} > 100 |
| Dates | ISO 8601 format strings | {{expires_at}} > {{now}} |
| Strings | All other values | {{status}} == "active" |
Logical Operators
| Operator | Description | Example |
|---|---|---|
&& | AND | {{amount}} > 100 && {{status}} == "active" |
|| | OR | {{role}} == "admin" || {{role}} == "moderator" |
Examples
Output
The condition node outputs information about the evaluation:| Field | Type | Description |
|---|---|---|
result | boolean | Whether any condition matched |
branch | string | Which branch was taken: "conditions[N]" or "else" |
matched_index | number | Index of matched condition (-1 if else branch) |
Examples
Basic If/Else
Multiple Conditions (If/Else-If/Else)
Complex Condition
Checking HTTP Response
Execution Behavior
- Conditions are evaluated in order
- The first matching condition’s
thenbranch executes - If no condition matches, the
elsebranch executes (if defined) - Unmatched branches are skipped
Branch Merging
Branches can merge back by pointing to the same subsequent node:Related
- Switch Node - Multi-way branching with pattern matching
- Template Expressions - Expression syntax reference