Skip to content


Use the Switch node to route a workflow conditionally based on comparison operations. It's similar to the IF node, but supports multiple output routes.

Examples and templates

For usage examples and templates to help you get started, refer to n8n's Switch integrations page.

Node reference#

Mode: select whether to define the conditions as rules in the node, or as an expression, programmatically.

Add Routing Rule: add comparison conditions using the dropdown. The available comparison operations vary for each data type:

  • Boolean
    • Equal
    • Not Equal
  • Number
    • Smaller
    • Smaller Equal
    • Equal
    • Not Equal
    • Larger
    • Larger Equal
  • String
    • Contains
    • Equal
    • Not Contains
    • Not Equal
    • Regex

Fallback Output: choose how to route the workflow when none of the conditions match.

View example workflows and related content on n8n's website.

Refer to Splitting with conditionals for more information on using conditionals to create complex logic in n8n.