Let AI triage your inbox for you

Step 6 of 13

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.

The n8n panel for: Route by category with a Switch node4 things to set here
  1. 1Open the Switch nodedouble-click it on the canvas
  2. 2Valuepaste as an expression
  3. 3Outputscopy the value below
  4. 4Check before moving onYour test email leaves through exactly one output.
Switch panel in n8nTap to enlarge
Valueexpression
{{ $json.category }}
Outputs
needs_reply · fyi · newsletter · receipt
Checkpoint
Your test email leaves through exactly one output.