Yes, that is expected behavior and is supposed to work that way. After all, do you send two totally different items to the Send Email Node, and so it will execute 2x.
If you want that it executes only once, you have to make sure only to send one item to the node. You can do that, by combining the two items into one with the help of the Merge-Node. The settings to achieve what you want would be:
Mode: Combine
Combination Mode: Merge By Position
The Merge-Node will then combine the data it receives from both inputs into one item. If you connect the Send Email node afterward it will do what you want.
Be aware that, in most cases, you do not want to connect more than one connection to one input. It is normally just required if you:
Build a loop
You have items from different branches which should process the data the same way moving forward
Thanks @jan for your fast weekend response and your explanations.
I tried the merge node before, but didn’t realize, that I have to use the “Merge by position” mode. I thought, the merge node was simply not able to merge a binary and a JSON.
It works now! Thanks!
BTW I’m really amazed of the usability of n8n. I had so many situations, where I thought, it would be really nice, if I would now have the option to do X and then discovered, there’s a button or option for exactly that.
Really great to hear that n8n is useful for you and turned never out to be a blocker. That is def. one of our goals to be the most powerful and versatile tool out there.