Merge Node Mode Append

Hi n8n community.

I already searched documentation and the community, but did not quite find my answer.
I’m not sure if I understand the workflow / node behaviour correctly.

Describe the issue/error/question

I want to merge two HTTP Requests results and work with the data.
I want to do a third HTTP Request, when both Requests are finished and merged.

To test it I added a send email node after the merge. It sends two emails.

By documentation " * Append: Combines data of both inputs. The output will contain items of input 1 and input 2." I would expect another behaviour

{{$node["Merge"].json["body"]}} {{$node["Merge"].json["betnr"]}}

Please share the workflow

Share the output returned by the last node

two send e-mails

Information on your n8n setup

  • Running n8n via [n8n.cloud]:

Hi @tarun, welcome to the community :tada:

(Most) n8n nodes will run once for each item they receive (exceptions are listed here). The Append mode of the Merge node would simply combine multiple items from its two inputs into a single list of items.

Seeing you are passing one item from each of your HTTP Request nodes on to the Merge node, you therefore have two items leaving the Merge node when using the Append mode and as a result two emails going out.

If you only want to have one item following your Merge node, you’d need to use one of the actual Merge modes, for example the Merge By Index mode:

Using this mode, the first item from your first HTTP Request node would be merged into the first item from your second HTTP Request node. Meaning you’d only have one item leaving the Merge node and only one email going out.

1 Like

Hi @MutedJam

thanks for your fast answer.
I made a mistake by misinterpreting “items” in the description of the node.

Best Uwe

1 Like

You are most welcome, glad to hear we manage to sort this out and thanks so much for sharing your feedback!