IF Branch results in empty item

I have an workflow that loops over an array 7 times and it works but after seven times, when the loop ends the if stmt doesn’t return the current json as usual but an empty object.

Fun part: If I test the stmt manually it works - it returns the current json in the false branche. But if run the workflow the result is empty.

Here is my workflow (I removed the business logic from the loop, the result is the same):

  • n8nVersion: 1.55.3
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.15.0
  • database: sqlite
  • executionMode: regular

Any ideas?

Thank you

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:

@pfiadDi , the problem appears to stem from the following:

  1. You haven’t configured the last Set node which results in empty output.
  2. When Set node is configured it still shows empty input (but does produce output) when connected to False output of IF node
  3. Switching True and False around, that is connecting the last Set to True (as opposed to False) fixes the input of the Set node.

Here’s the reworked workflow to demonstrate the correctly displayed data.

While this workaround puts everything in place, it does not answer the question why the input of the last Set node is empty when the node is connected to False output of IF node despite having data presented in IF node.

I think n8n team would have to take a closer look at that.

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