Workflow Nodes
Conditions & Switch
Route execution dynamically based on step outputs, input values, or external data.
Condition Node
The Condition node evaluates a boolean expression and routes execution to one of two branches: if_true or if_false. It supports operators like ==, !=, >, <, contains, and startsWith.
condition-node.json
{
"type": "condition",
"conditionType": "step_output",
"operator": "==",
"value": "200",
"if_true": [
{ "type": "email", "to": "success@example.com" }
],
"if_false": [
{ "type": "email", "to": "error@example.com" }
]
}Switch Node
The Switch node routes execution to one of multiple cases based on a value. It is useful when you have more than two outcomes. Cases are defined as edges in the visual builder.
switch-node.json
{
"type": "switch",
"cases": {
"success": [{ "type": "email", "to": "success@example.com" }],
"error": [{ "type": "email", "to": "error@example.com" }],
"timeout": [{ "type": "delay", "seconds": 60 }]
}
}Notes
- • Routing is edge-driven: connections define execution paths.
- • If no case matches, the switch node falls through to the default branch if one is defined.
- • Condition evaluation uses strict boolean logic and avoids unsafe substring matching.