06 / 13Switch
Route by category with a Switch node
Add a Switch node keyed on with one output per category. A Switch is much easier to read than a chain of If nodes once you have more than two paths.
4 things to set here- 1Open the Switch node — double-click it on the canvas
- 2Value — paste as an expression
- 3Outputs — copy the value below
- 4Check before moving on — Your test email leaves through exactly one output.
Valueexpression
{{ $json.category }}Outputs
needs_reply · fyi · newsletter · receipt
Checkpoint
Your test email leaves through exactly one output.