If / Else
Branches the workflow based on a condition. The node evaluates an expression and routes execution down either the true or false output port.
Properties
| Property | Required | Description |
|---|---|---|
| Variable | Yes | The value to evaluate. Supports expressions |
| Operation | Yes | The comparison to perform |
| Compare Value | Conditional | The value to compare against (not required for isEmpty, isTrue, isFalse) |
Operations
| Operation | Description |
|---|---|
| Is Equal To | Passes true if the variable strictly equals the compare value |
| Not Equal To | Passes true if the variable does not equal the compare value |
| Contains | Passes true if the variable contains the compare value as a substring |
| Is Empty | Passes true if the variable is null, undefined, or an empty string |
| Is True | Passes true if the variable is the boolean true or the string "true" |
| Is False | Passes true if the variable is the boolean false or the string "false" |
Output ports
| Port | When |
|---|---|
true | The condition evaluated to true |
false | The condition evaluated to false |
Connect different nodes to each port to handle both outcomes. You may leave one port unconnected if you only need to act on one branch.
Example
Check whether an API response was successful:
- Variable:
{{ $nodes['HTTP Request'].statusCode }} - Operation: Is Equal To
- Compare Value:
200
Nodes connected to true handle the success case; nodes connected to false handle failures.
You can also branch on execution status directly:
- Variable:
{{ $status['HTTP Request'].isSuccess }} - Operation: Is True