n8n Switch nodeConfigure Switch in n8n.
Switch sends each incoming item down one of several outputs. The n8n Switch node hangs on a single head parameter, Mode, which picks between matching rules and an expression returning an output index. Useful once a workflow has to serve three or four different paths.
Verified Trustpilot reviews · AI, automation & growth agency
What does the n8n Switch node actually do?
Switch is a core node that routes items depending on a defined expression or rules. It sits in the middle of a workflow, reads each item that reaches it, and decides which of its outputs that item leaves by. Where the If node gives a true branch and a false branch, Switch opens as many branches as the routing needs, so one workflow can handle several cases without being copied four times over.
Take a support inbox. Messages land through a trigger, and the priority field decides the rest: urgent tickets go to one output, billing questions to another, everything else to a third. Each branch then does its own thing, a message posted to Slack here, a reply drafted in Gmail there. One node, three destinations. The rules still read fine months later.
A second case: an order feed where the amount matters. Small orders are logged in Google Sheets and nothing else happens. Bigger ones get a notification and a follow-up task. The Routing Rules use a number comparison, and because rules are evaluated in order, the tightest condition goes first.
A third case runs on Expression mode instead. A payload carries a region code, a short expression turns it into an index, and the item leaves through the matching output. No rule list to maintain, just a calculation that returns a number. Expression mode earns its place when the branch count is stable and the logic is arithmetic rather than a set of comparisons.
When should something else do the job? A plain yes or no test belongs to the If node, which is easier to read with two branches. Routing that ends in a call to an API with no dedicated node is still routing, so Switch picks the branch and HTTP Request makes the call at the end of it. And if the goal is to change the data rather than to send it somewhere, Switch is the wrong tool: it moves items, it never rewrites them.
The limits are worth knowing before building. An item that matches no rule is dropped unless Fallback Output says otherwise, which is the most common surprise. Rules compare values, so the data type selected has to match what the field holds. Version 3 of the node is what this page describes; an older workflow can show an earlier version with fewer options. If conditional logic is a recurring headache in the team, the n8n training covers it hands on.
How is the Switch node configured?
The Switch node has one parameter. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.
Parameters index
Mode
modeWhat you see in n8n
Notes & use cases
Mode decides how data should be routed, and the rest of the panel follows from it.
Key parameters
- Mode:
rulesbuilds a matching rule per output,expressionreturns the output index. - Routing Rules: one condition per output, added with Add Routing Rule; Rename Output turns on an Output Name.
- Number of Outputs and Output Index: the Expression pair, where the expression must return a number and indexes start at
0. - Options: Fallback Output (None, Extra Output, Output 0), Ignore Case, Less Strict Type Validation, Send data to all matching outputs.
{{ $json.score }}.Need help automating Switch with n8n?
A person reads every message.
Switch node questions
01Is the Switch node included in n8n?
02What do you need to make the Switch node work?
03What are the limits of the n8n Switch node?
04Switch or the If node for conditional routing?
05n8n or Make for conditional routing?
Get our weekly integration tips.
No spam. Unsubscribe anytime.

