Merge node behaves differently in foreground than in background

Hello n8n experts!

I noticed that the Merge node behaves differently in foreground than in background.

For example, when using the Append mode in background it will stop the execution until it receives both inputs but in foreground it won’t stop.

Funny enough, it’s the opposite with the “Choose Branch” mode with the output type “Wait for both inputs to Arrive”. On foreground the node won’t generate any output unless both inputs are received but in background it does generate an output if one of the two inputs is not received.

Please share your workflow

This is an old workflow (from before the great pagination feature was included in the HTTP node) where we use the Append node:

In foreground:

But in background it won’t loop because it stops in the Merge node:

Is this a known bug?

Information on our n8n setup

  • n8n version: 1.21.0
  • Database (default: SQLite): postgresql 14.8
  • n8n EXECUTIONS_PROCESS setting (default: own, main): queue
  • Running n8n via (Docker, npm, n8n cloud, desktop app): kubernetes
  • Operating system: amazon linuex

Hi @Fortian :wave:

Just wanted to double check here - by “background”, do you mean production executions, and by “foreground”, do you mean manual executions?

If so, I think I’ve seen what you mean :thinking: It sure does stop right where you’re mentioning when you test, but if you run the workflow via the production webhook, it goes through the entire workflow. I don’t think that’s intended so I’ll flag this with the team - I’ll post any updates when I have them!

1 Like

Hello @EmeraldHerald

That’s exactly what I meant :slight_smile:

Thanks for flagging this to the team!

1 Like