Switch
Sends the workflow down one of several paths. You define an ordered list of rules; Switch checks them from top to bottom and continues on the output of the first rule that matches. When no rule matches, it continues on Fallback.
Switch is configured in its own dialog (Configure Switch) rather than the regular property panel.
Settings
| Setting | Required | Default | Description |
|---|---|---|---|
Value to pass on (value) | No | — | Any value (usually an expression) to hand to the next step as output.value. It is not used for matching. |
Rules (rules) | Yes | Case 1, Case 2 | Each rule has a name and a set of conditions combined with AND or OR. At least one rule is required. |
Each rule's conditions use the same builder, value types and operators as Filter. Write the values you want to test as expressions, e.g. {{ $trigger.body.type }}. A rule with no conditions is skipped.
Use the arrows to reorder rules — order matters, because the first match wins. Add rule adds a new output; Remove rule deletes it and the connections from its output.
Ports
| Port | Description |
|---|---|
main (input) | The step(s) Switch runs after. |
case1, case2, … | One output per rule, labelled with the rule's name. The port key (case1, case2, …) stays the same when you rename or reorder rules. |
fallback | Taken when no rule matches. Always listed last. |
Only the chosen output continues; branches connected to the other outputs are skipped.
Output
{
"matched": "case2",
"rule": "Refund",
"value": { "type": "refund", "orderId": 4417 }
}
| Field | Description |
|---|---|
matched | The port that was taken (case1, …, or fallback). |
rule | The matching rule's name, or Fallback. |
value | The resolved Value to pass on. |
Example
Route incoming webhook events by type:
- Value to pass on:
{{ $trigger.body }} - Rule Order (
case1):{{ $trigger.body.type }}equalsorder.created - Rule Refund (
case2):{{ $trigger.body.type }}equalsrefund.created - Fallback: connect a Throw Exception step to fail on unknown events.