You are right that if you put the mail node inside of the loop you will receive an email for every row of the sheet. But you won’t receive multiple emails if you place the mail node right after the trigger as shown in the image below:
Then you can simply put the mail node after the sheets node. You see, only the nodes inside the loop execute multiple times. Any nodes after or before the loop work only once for every time the workflow executes. This image would explain it better:
Hi Mookie, I have the exact sample you have there, but it sends an email for every row in spreadsheet. That’s not what I want. I just want it to send one email with the name of the spreadsheet etc. and then let it continue with processing each row in the Loop.
I also thought adding the email before the loop would only send one email.
I suppose the loop node executes every node in its own path for every batch. Having a different path connected to the same trigger must be the solution.
the thing is a node will run n number of times(n=number of json objects sent to node).
In your case these are all all number of rows in sheet.
what you can do is add code node before and after email node.
In before code node you can make one object and then format results in a way you want in email.
then send email
In after code node you can you can reconvert that data as required.