Type identifier:
control:ifCategory: Control Operations
Conditional branching node that evaluates a boolean condition and directs the run down one of two paths. Supports both control flow mode (branching the run) and data mode (selecting between values).
ifType: "control")Handle | Data Type | Required | Description |
|---|---|---|---|
|
| Yes | Execution trigger input |
|
| Yes | Boolean value to evaluate |
ifType: "data")Handle | Data Type | Required | Description |
|---|---|---|---|
|
| Yes | Boolean value to evaluate |
|
| No | Value to output if condition true |
|
| No | Value to output if condition false |
ifType: "control")Handle | Data Type | Description |
|---|---|---|
|
| Triggered when condition is truthy |
|
| Triggered when condition is falsy |
ifType: "data")Handle | Data Type | Description |
|---|---|---|
|
| The selected value (then or else input) |
Property | Type | Required | Default | Description |
|---|---|---|---|---|
|
| Yes |
| Display label for the node |
|
| No |
| Operating mode of the node |
ifType"control" | "data""control"Notes:
"control": Branches the run based on condition"data": Selects between two values based on conditionIn control mode, the node branches the run based on the condition:
trigger input handlecondition input valueif or else output handleTruthy values: Any value that is not false, null, undefined, 0, "", or NaN
In data mode, the node acts as a ternary selector:
condition input valuethen or else inputvalue handleNote: In data mode, no trigger handles are used — the node is purely for data transformation.
Scenario | Behaviour |
|---|---|
No condition edge connected | Error: "control:if:... has no incoming edges." |
Condition is | Control: triggers |
Condition is | Control: triggers |
Condition is | Treated as falsy, follows |
Condition is non-boolean value | Evaluated for truthiness |
{
"type": "control:if",
"data": {
"label": "Check Active",
"ifType": "control"
}
}Input Handles:
trigger (trigger)condition (boolean)Output Handles:
if (trigger) — labelled "Then" in UIelse (trigger){
"type": "control:if",
"data": {
"label": "Select Message",
"ifType": "data"
}
}Input Handles:
condition (boolean)then (any)else (any)Output Handles:
value (any) — type matches connected then/else handles[trigger] → [condition: isActive] → control:if
├─ if → [process active user]
└─ else → [send activation email][condition: isPremium] → control:if ← [then: "Premium Support"]
↑
[else: "Basic Support"]
↓
[value] → [display message]