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
(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.