MongoDB Merge not working

Describe the problem/error/question

I use a trigger that executes two MongoDB queries — both queries complete successfully and return data (sometimes different quantities, sometimes the same amount).
I then want to perform an inner join of these two results based on specific fields using the Merge node.

When I manually press Test Step on each node individually in sequence, everything works fine — the data is merged correctly.
However, when I execute the workflow fully (using Test Workflow on the trigger node), the two MongoDB requests run, but once they hit the Merge node, it shows “no data to output.”

Strangely, if I open the Merge node afterwards, click Test Step with the available data (from that same execution), the merging works perfectly — the merged data is output correctly.

In short:

  • Test Step manually → works
  • Test Workflow full run → Merge node reports empty output

What is the error message (if any)?

There is no error message — just no data output from the Merge node.

Please share your workflow

MongoDB User Node Data:

[
  {
    "_id": "681048c63c1170aac69983ef",
    "email": "[email protected]"
  }
]

MongoDB OnboardingResponse Data:

[
  {
    "userId": "681048c63c1170aac69983ef"
  }
]

Share the output returned by the last node

When running via Test Workflow, the Merge node output is empty — this is the problem!

When manually testing the Merge node with available input, it merges successfully as expected.

Debug info

core

  • n8nVersion: 1.88.0
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.19.0
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: 8cfefd9b-f0a9-4dfe-88a9-88e7d2a5b0d3

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: memory

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/135.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-04-29T04:37:24.431Z

As for as I understand your problem I am giving you solution please try this and see if that works :

Enable “Wait” Mode

  1. Open your Merge node
  2. Go to the “Options” tab
  3. Enable “Wait for all inputs” option
  4. Save and run the workflow again

This forces the Merge node to wait until both MongoDB queries complete before attempting to merge data, solving the race condition where one input might not be available yet.

On Merge node version 3.1 there is a Settings tab and it has no wait for all inputs options!


Further

The merging seems to be broken overall!

Here append works and outputs a list with all the items. This setup takes away the timing between input1 and input2 but still no ouput in node Merge1. Only after manually clicking Test step it produces the right output - which on the other hand side suggests that the behavior of the node works and it might be a timing issue after all!