[Bug] If Node output false with Send Email node problem!

There is a bug when using If Node with Send Email node, I have Google Sheets like this pic
Link: n8n v3 - Google Tabellen

I setup a simple Workflow with If Node and Send Email like this

My If condition is If updated = 1, I want to send If Node output false but instead of sending email with If Node output false, Send Email node will send the number emails in list by order, You can check by use above code. Please check this!

For more clearly, I’ve made a video to describe, hope you guys understand If Node output false with Send Email node problem - YouTube

Without having tested anything there seems to be something messed up in the json. For some reason the main connection is connected to null.

So, Is there any my configure wrong?

Put your code in ```(Before and after) to have it formatted correctly for people to copy here and test it :slight_smile:

1 Like

The last two fields in the spreadsheet do not have a value. Perhaps that is the issue.

I’m not sure what he wants to do

If Updated = 1 it needs to send an email
and if it’s not then what?

(I’m not completely sure what would be going wrong)

Sorry for my bad explain, I’ve updated picture and code for more clearly! I have 2 group, updated = 1 and not = 1. I want to send email to 2 groups. I’ve add Google Sheets append for more clear. Output to Sheet2 with Google Sheets append is ok with If node output field, but Send Email node is not!

For more clearly, I’ve made a video to describe, hope you guys understand If Node output false with Send Email node problem - YouTube

I’ve noticed that sometimes False values do not get passes along properly, to fix it in my case i do this, it’s probably not the ultimate solution but it works:

1 Like

Thanks for your guest solution, hope @jan @RicardoE105 will have the permanent solution for this!

Atleast you can test out the rest for now :slight_smile:

1 Like

@huuich, maybe trying the Switch node rather the IF node delivery the desired (multistep) result? However, I am new to n8n and might be totally mislead.

1 Like

Yeah, Your solution is ok! I’ve use your code to test.

You can try, Switch node has same problem like IF node

From what i’ve noticed, the only way to get a correct reponse from the “False” outputs is to use the merge in a passthrough mode (Or to use another node as passthrough)

I had now a look. The problem is that you use the expression with $node. That one does by default always use the data of the first output (so output with index 0, which is in the case of the IF-Ndoe “true”). If you change your expression to $json it uses the incoming data the node receives and works then as you expect.

So you would have to change the expression from:




Also realized that our documentation has an error. It says instead of “output” wrongly “item”. We will fix that.


Thanks for detail explain, It’s working like expected now!