N8n Cloud Bug Report: Switch Node “Starts With”/“Contains” Conditions Not Working

Platform: n8n Cloud
Version: 1.102.4
Browser: (tested on latest Chrome/MacOS)

Summary

The Switch node does not correctly match simple “starts with” or “contains” rules against string fields, always sending items to the Fallback output—even when the field value obviously matches the rule. This occurs even in a minimal workflow with clearly defined string values.


Steps to Reproduce

1. Create a new workflow:

  • Add a manual trigger (When clicking 'Execute workflow').

2. Add an Edit Fields node:

  • Mode: Manual Mapping
  • Field: url (String)
  • Value: http://testexample@nosuchemail.com

3. Add a Switch node:

  • Mode: Rules
  • Routing rule:
    • Field: url
    • Condition: starts with
    • Value: http

4. (Optionally) Add NoOp nodes to all outputs for clarity.

5. Execute the workflow.


Expected Result

  • The item should go to Output 0 (the “http” branch).

Actual Result

  • The item always goes to the Fallback output, regardless of input.
  • The problem also occurs with the “contains” condition, and with obvious string matches (e.g. url: 'https://...', rule: “starts with https”).
  • Changing browsers, refreshing, and using new workflows does not help.

Additional Debugging

  • Data is confirmed to be a string via a Code node:
return [{json: {url: $json.url, type: typeof $json.url}}];

Output:

{
  "url": "http://testexample@nosuchemail.com",
  "type": "string"
}
  • Issue persists even when field is set as an expression or with different test values.
  • The bug occurs in both more complex workflows and fresh, minimal ones.

Screenshots

Workflow Setup:

Edit Fields Node:

Switch Node Parameters and Output:


Environment

  • n8n Cloud version 1.102.4
  • Browser: Chrome (Mac OS)

Conclusion

This appears to be a regression or recent bug in Switch node behavior regarding string matching and routing. The Switch node is currently unusable for simple “starts with”/“contains” matching.

Please investigate—this is blocking my production workflow.

Let me know if you need a sample workflow export or additional logs.


Thank you!
Andy

Hey @AndyC24uk hope all is well. Can you share the workflow itself instead of a screenshot, as it looks like this works for me just fine. (although I am testing on self-hosted version)

Thanks @jabbson! Here is the workflow.

The problem is here:

it should be not url, it should be {{ $json.url }} and the field needs to be an expression.

This output is not activated because the text url and the text http://testexample@nosuchemail.com and not equal.

Fantastic! That solved it! Thanks!