Describe the issue/error/question
Recently discovered n8n and love it - kudos to the creators!
I seem to be having a hard time understanding how to use the Merge node in my workflows - it does not behave as I expect in multiple different scenarios. I will describe (hopefully) a simple one here to see if I can learn what I’m doing wrong.
What is the error message (if any)?
The node is in ‘passthrough’ mode, it receives both inputs, but outputs nothing and the workflow stops. Both of the previous IF nodes show data is output, and a single item sent to each input but the Merge mode itself shows ‘no text data found’.
Please share the workflow
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database you’re using (default: SQLite):
- Running n8n with the execution process [own(default), main]:
Running n8n via [Docker, npm, n8n.cloud, desktop app]:
Hi @Felix_is_stuck, I’m sorry to hear you’re having trouble. From looking at your workflow it seems to rely on a number of external data sources, so I am not entirely sure what’s happening yet.
In my test scenario the node was working as expected:
Could you share a dummy workflow not needing any additional data using which the problem can be reproduced?
Welcome to the community @Felix_is_stuck and great to hear that you enjoy n8n!
Is it possible that the IF-Nodes (“IF1” or “IF User is NOT bound to an assignment”) never output any data on the true branch?
Thank you @MutedJam and @jan for your replies.
@jan, both IF nodes are outputting data.
To add a little more info, if the IF node “IF User is NOT bound to an assignment1” tests TRUE on the first pass, the merge node outputs as expected. Only when it fails on the first pass and then fetches new data from Airtable, does it fail when it next tests TRUE.
See the data Input 2 data below from both scenarios for comparison:
IF node “IF User is NOT bound to an assignment1” Output 1 (merge node operates as (I) expected:
“Bind User”: “”,
“Assignment ID”: “recmXMH99e5FVu0Pb”
IF node “IF User is NOT bound to an assignment1” Output 2 (merge node outputs nothing):
“Assignment ID”: “recmXMH99e5FVu0Pb”
IF node “IF1” outputs the same data each time it tests TRUE:
I have another example here where the Merge node does not do as expected. I am using two Merge nodes in the Workflow, the first works flawlessly, the second however seems to trigger the node attached to input 2 prematurely (before this node has received any input) and as a result, it’s output doesn’t contain the data that I need.
Here is the flow:
Those are two different things. The 2 on the node means it got executed twice (as you did connect two nodes and each connection executes the node 1x), the 2 on the connection means that both executions combined have 2 items (so in this case 1 item each).
The Merge node combines data of the one execution of input 1, with the data of one execution of input 2. For the second execution there is never any data on input 1 and for that reason does it get ignored (or lost). What you probably want to do is not have a Set-Node with two input connections (and so different runs) you want to combine the data first with a Merge-Node that they end up in the same execution.
Hi @jan! Thanks for your reply.
I still don’t get it.
You say “(as you did connect two nodes and each connection executes the node 1x)” - the two connectors to my Set node are the opposing paths from a previous IF node (see additional screenshot below):
Why would the FALSE path on the IF node trigger the Set node? I does not generally behave in this fashion - I only see it now when using the Merge node.
Can you please share a screenshot of the full workflow? Sounds like it is potentially the same issue as described here: Switch and merge node