Docs
Sign in

Switch

The Switch node compares one value against a list of cases and sends the workflow down the path of the case that matches.

Screenshot to add: A Switch node listing its cases and a Default entry, with an output for each case, and its settings panel.

The palette describes it as "Multi-case switch".

When to use it

Use it when one value can take several known options, such as an order status of "new", "paid" or "shipped", and each option needs a different path.

Settings

FieldWhat it doesNotes
ExpressionThe value to match against each casePlaceholder {{ input.status }}. A new node starts with {{ output.value }}
CasesThe list of casesA new node starts with Case A (value "a") and Case B (value "b")
Include default (else) branchAdds a path for values that match no caseOn by default

Each case has:

FieldWhat it doesNotes
Case labelThe name shown on the node and on its outputPlaceholder "Case label"
Match valueThe value to compare withPlaceholder "Match value"

Click Add case to add one. The trash icon removes a case. New cases are named "Case 1", "Case 2" and so on.

Inputs and outputs

HandleWherePurpose
InputTopThe step that comes before
One output per caseRight side, evenly spacedThe path for that case
defaultBottomThe path when no case matches

The node lists each case with a number, plus a D entry for the default (named "Default" unless a default label is set).

Example

This is an illustrative example. You are handling order statuses.

  1. Set Expression to {{ input.status }}.
  2. Add a case labelled "Paid" with match value "paid", and a case labelled "Shipped" with match value "shipped".
  3. Keep Include default (else) branch on, and connect the default output to a step that logs unexpected statuses.

Tips

  • The starter cases use quotes around their values ("a"). Follow the same style if your expression returns text.
  • Keep the default branch on unless you are sure every value is covered.