Starbase / 02 RecipeAgents

RecipeAgents / n8n nodes / Switch

Node reference · data pulled Oct 26, 2026

n8n Switch node: what the data shows

Routes each item to one of many outputs, by rules or by an expression that returns an output number.

2,069public templates use it (15.2% of 13,574)
65.7%of those also contain an AI node
59.3score out of 80 · rank 7 of 22
59commits to its source folder on GitHub

What it does

In Rules mode you add one rule per output; in Expression mode a single expression returns the output index. Since late 2023 there's no fixed limit on outputs, and you can choose whether an item goes to the first matching output or to all of them.

Its most distinctive partners are WhatsApp and the Telegram Trigger: chat bots use it to send text, voice and image messages to different handlers.

How often public templates use it

2,069 of the 13,574 public templates on n8n.io (15.2%) contain this node, in the snapshot we took on 2026-10-20. The table splits that by the year each template was published. 2026 runs to October 20.

Year publishedTemplates with the nodeShare of that year
202464 of 46213.9%
2025877 of 6,56413.4%
20261,101 of 5,84518.8%

The median template using this node has 193 views on n8n.io, against 284 for all templates. Template counts show what people publish, not what runs in production.

What it is used with

The most frequent partners are the nodes that appear most often in the same templates. "Lift" compares that with the whole library: 2× means the partner turns up twice as often next to this node as in an average template.

Most frequent partnerShare of its templatesLift
Edit Fields (Set)69.7%1.25×
Code64.0%1.08×
If54.5%1.08×
HTTP Request54.5%1.06×
AI Agent39.4%1.26×
Google Sheets36.9%1.03×

Strong pairings (in at least 5% of its templates, lift 1.5× or more): 12. The top ones:

Strong partnerShare of its templatesLift
WhatsApp Business Cloud5.7%2.83×
Telegram Trigger15.3%2.51×
Postgres6.3%2.51×
Data Table7.3%1.92×
Extract from File10.9%1.82×
Google Gemini5.5%1.80×
Execute Workflow Trigger7.4%1.75×
Gmail Trigger6.7%1.71×

Most viewed public templates that use it: Building your first whatsapp chatbot (541,254 views); Ai powered whatsapp chatbot for text voice images and pdf with rag (258,703 views); Telegram ai chatbot (234,547 views).

Versions and changes

Node versions from the npm packages n8n-nodes-base and @n8n/n8n-nodes-langchain, version 2.44.4. New workflows get the default version; workflows built earlier keep the version they were built with until you replace the node.

NodeVersionsDefaultCredential typesScope
Switch1, 2, 3, 3.1, 3.2, 3.3, 3.4, 3.53.5none needed–

Source on GitHub: packages/nodes-base/nodes/Switch: 59 commits since the repository was reorganised on 2021-11-17, last on 2026-10-13.

Recent fixes and features

  • 2025-09-12: fix( Switch Node): Disable expressions for Number of Outputs in v3.3 (PR #19075)
  • 2024-01-24: fix(Switch Node): Fix issue preventing some regex patterns from working (PR #8422)
  • 2024-01-04: feat(Switch Node): Overhaul (PR #7855)
  • 2023-10-31: fix(Switch Node): Allow sortable Switch rules (PR #7555)
  • 2023-10-25: feat(Switch Node): Add support for infinite Switch outputs (PR #7499)

Merged dates from GitHub. A fix only helps once your n8n instance runs a release that includes it, so check your version.

Known problems

  • Unmatched items vanish. The default fallback is None, which silently ignores items that match no rule. Add an extra output to catch them. Source: n8n docs
  • Only the first match. By default an item goes to the first matching output; turn on sending to all matching outputs if you need more. Source: n8n docs
  • Regex patterns. Some regex patterns didn't work until a January 2024 fix. Source: n8n PR #8422
  • Number of outputs. Expressions are no longer allowed for Number of Outputs from v3.3 (September 2025). Source: n8n PR #19075

Forum trouble signal: not measured. The n8n community forum's terms forbid automated access, so we don't count forum threads.

Our recipes that use it

None of our 25 recipes uses this node yet. Browse all of them on the free n8n templates page.

Official docs and sources

Usage, pairings, AI share and views: our count of 13,574 public n8n.io templates (snapshot 2026-10-20). Versions: npm packages, version 2.44.4. Changes: n8n's GitHub repository. Docs read and data pulled Oct 26, 2026. We describe each node in our own words; the docs are the authority on settings.

Related nodes

Questions

How many n8n templates use the Switch node?
2,069 of the 13,574 public templates on n8n.io (15.2%), in our snapshot of 2026-10-20.
What is the Switch node most often used with?
Edit Fields (Set), which appears in 69.7% of its templates. The most distinctive partner is WhatsApp Business Cloud (lift 2.8×).
How do I route Telegram messages by type in n8n?
A Switch after the Telegram Trigger, with one rule per message type (text, voice, photo), is a common pattern in public templates.
Why are some items missing after my Switch?
They matched no rule and the fallback is set to None. Set it to an extra output.
Newsletter

One small automation every Friday

Each Friday email has one recipe, the prompt for it, and the way it broke when we wrote it up. It's free, and every email has an unsubscribe link.