Switch Node Refuses to Work Properly According to Set Rules - What could be the problem?

Describe the problem/error/question

Information on your n8n setup

Hi There please a problem with the Switch Node. it never seem to work properly to the rules that i set. i set 2 rules: Eg Rule 1 - if 'Value = Salary Earner, then send data up for further personalised email messaging. Rule 2 - if same Value = Self Employed, then send data down for further personalized email messaging.  
Now the Problem is that the switch refuses to adhere. its either it sends the both rule data upward, or it doesnt send anything at all. i've set everything correctly but still does the same thing. i've delete the switch node and start all over with all correct settings but still the same problem. please how do i fix this
1 Like

Hi @AustyneDigitalsAI

sounds like your expression is referencing the wrong item.

if it’s sending all the data even the Self Employed stuff to the ‘Salary Earner’ path, your switch node is probably looking at the first item for every single check.
could you send me a screen shot for the value field on the left side of your rule??

2 Likes

Hi @AustyneDigitalsAI Welcome to the community!
Can you please share your workflow JSON for us to understand your data and swtich node.

2 Likes

Aww thanks soo much for your response, it means a lot to me that i got a response for the problem. however, i ended up detecting the problem after several troubleshooting, i found out that in the json data of the supplying node, there was a space bar after the word i intended to match. i ended up adding the same space bar to the result i wanted to match in the Switch Node, and that just corrected it immediately. my switch Node is now working as expected. Thanks so much family

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