Hey n8n community
Describe the problem/error/question
I have a Merge node and This Merge only has data in one of inputs for each Execute, but the problem I have now is that the Merge node only outputs when it has data from both inputs, while randomly only one of the inputs has data. Can you help me?
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
- **n8n version:1.1.1
- **Database: SQLite
- **n8n EXECUTIONS_PROCESS setting: own
- **Running n8n via : Docker
Hi @iman_ns Welcome to the community
Merge will indeed try and wait for both inputs as you’ve noticed - can you go into a little bit more detail about what you’re trying to achieve with this workflow? If you could share an example, that would be helpful!
Merge node - Combine - Merge by position works every time if data on one of 2 inpits have arrived
There is no check to waiting second input to arrive.
I now don’t understand how to add data in such a case, because when going into one of the inputs, merge node skips the data.
The only option where it asks for both inputs is choose branch mode, but in this case one of the threads can only be selected, but I want to merge. The mode combine merge by fields is not suitable often for the reason that I want to get full data from nodes based on other data that are not even in the neighbouring node.
In order to merge data on version up to 1. I always used Merge node - Combine - Merge by position and the data merged perfectly, this is my most popular node in all scenarios because there is no mechanism for API requests to get not only the response from the API but also data from the previous node, and this mode has always saved me.
Merge by fields if match fields - enrichInput1 or enrichInput2 returns only input 1 or input 2 without adding data from second input.
works as choose branch mode
Hi @lightcom You’re right in that there’s no waiting logic in the combine mode. This would be more of a feature request, and you can make that request in this section of the forums: Feature Requests - n8n
What I think is happening here is maybe you’re noticing the difference in how n8n used to operate, and how it currently does. How it used to work before version 1, is this:
How it would work using version 1’s workflow order is this:
You can change this by selecting the legacy option here:
For now, you could just combine two merge nodes: one running in “Wait for Both Inputs to Arrive” mode outputting data from input 1, and then another one merging this data with the data from input 2, and I think that will give you more of what you’re after
Okay waiting is needed? legacy in my case ot works with merge nodes.
how now to combine two inputs by position?
Hi @lightcom I’m not too sure what you mean by combining two inputs by position, but you can find the settings for your workflow by clicking here:
And then changing this setting to V0 (legacy):
Here is another example
n8n Version 1.8.2
Rewrited another way to merge13 before if11. Secondary Merge 12 not needed because if11 next contains all data.
But strange that Merge not wait second input on the legacy / works another way than 0.xxx versions
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.