Swtich node with multiple conditions

Is it possible to use the switch node with 1 input but multiple conditions?

Something like:

  1. Case 1: if the email address from input contains domain1.com OR domain2.com → output 1
  2. Case 2: if the email address from input contains domain3.com OR domain4.com OR domain 5 → output 2
  3. and so on

I have tried using OR, |, ||, but nothing seems to work

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @life.tripod , you could try using the boolen expression for each if the cases in the form {{ ["domain1.com", "domain2.com"].includes('some_value') }}. Surely you need to make sure some_value is also domain, not the whole email address.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.