Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Switch

core.switch · version 3.2 · Flow

Send each item to the output whose rule it matches.

Ports

PortKindLabelRequiredMax connections
input 0main
output 0main0

The number of ports depends on the parameters; the table shows the default set.

Credentials

This node uses no credentials.

Parameters

NameTypeDefaultRequiredShown whenDescription
modeoptions"rules"One of rules, expression.
rulesfixed_collectionmode = rulesRouting rules.
rules.valuesfixed_collectionRule.
rules.values.conditionsfilter
rules.values.renameOutputbooleanfalseName the output.
rules.values.outputKeystringrenameOutput = trueOutput name.
numberOutputsnumber4mode = expressionNumber of outputs.
outputnumbermode = expressionOutput index. Expression that returns the zero-based output for the item.
looseTypeValidationbooleanfalseConvert types where required.
optionscollection
options.fallbackOutputoptions"none"Unmatched items. Or the index of an existing output. One of none, extra.
options.renameFallbackOutputstringExtra output name.
options.ignoreCasebooleanfalseIgnore case.
options.allMatchingOutputsbooleanfalseSend to every matching output.

Import

Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.

Source typeVersion rangeStatusFixtures
n8n-nodes-base.switch1unverified
n8n-nodes-base.switch2unverified
n8n-nodes-base.switch>=3 <4unverified