IF node: everything is true, but returns false on full workflow execution

Describe the problem/error/question

Maybe someone has seen something like this. In my workflow, I have an IF node, which decides if we update the database record or create a new record. On full workflow execution, it goes FALSE, even tho everything is true. But when I execute the same run manually (node by node), the node is TRUE and returns TRUE.

What is the error message (if any)?

Screenshot from IF node full execution:

Screenshot from fully executed workflow:

When I go node by node, it goes TRUE:

Hey @Emils_Bisenieks,

That is interesting I have just mocked up the data and given it a test but I was not able to reproduce it, Could you run the workflow below and let me know if you see the same issue with it?

Can you also confirm which version of n8n are you using and how you have it deployed?

Hey, Jon! Yes, your workflow works as it should on my side as well.
I tried many things:

  1. Switch IF node to “Not Equal” and tried different combinations
  2. Renaming “isInDB”, taking data from other nodes.
  3. Doing just that part of the workflow, disconnecting “Webhook respond” nodes
  4. Taking those last nodes to another new workflow, but it works as it should.

The version we are using: Version 0.228.2 and we deploy it with Docker

I was getting the same behavior in the past. But that was related to numbers.

It seems that my “if” wasn’t able to understand the received value properly when triggering using cron, but that was not the same when running manually.

So I finally got the issue fixed by changing the check condition to String.
I guess that’s worth a try.

@Romuald_BARON Well, you were right. I will try to change my logic, but I think this will work. Thank you!

I have the same issue. If node doesn’t think true is true. I tried all possible setup - Boolean compare, string compare. My usecase is Split in Batches and this if checks for the last item. I do not know what else to change.

Maybe you need to update n8n, because the new “Split in Batches” node offers “Done” option:
Screenshot 2023-08-16 135316

1 Like

Thanks @Emils_Bisenieks, with the new version of Split it worked. But still I think there might be something wrong with IF.