The Loop Over parse correctly in the loop my data (extract from CSV), but when it’s finished, in done path it executes nodes the same number than the loop path instead of 1.
Is it normal ? I’l expecting the done path to be executed only once…
Hey @presta_melt , the “done” output will contain the outcome of all the processing done in the loop for each item that passed through the loop. So, yes, if you processed 13 items in the loop, the done loop will contains the final result of the loop computation for each of the 13 items.
If you intended to send only one final email after processing all 13 items then configure Send Email node to run just once.
Looking at your loop, it gives me the impression that it’s connecting to something else outside the flow, another loop that’s making it go through more than the 13 times (in this case, of course) and forcing it to pass through ‘done’ all those times… Could you show more parts of the loops?
In the first picture, decide if the action is “Do Nothing” or “Send Email.” If it’s “Send Email,” create a separate loop for those items. Once the loop finishes, it should switch to “Do Nothing.” For items marked as “Do Nothing,” they should remain untouched—just create a “Do Nothing” node for each loop as needed.
If you’re aiming to send one single email once everything is done, I’d suggest using a node to call another workflow. In this new workflow, you can handle sending the single email. It’s similar to the principles of “microservices”—let’s call it that, its easier that way, and more scalable
Cool!! In n this new workflow that handles only the email-sending function, you can receive a JSON object with all those items and work with them, deciding which data to extract, like email, name, or other information. If the JSON contains a lot of data, you can use a Code node to clean up those items, merge them into one, or even filter out duplicates. You can totally do this with ChatGPT if you need help! Im imagining the email is for one person only, but you can do as you please
The “done” path always returns the number of items that were fed into the Loop node. The structure of each item returned will depend on the actual processing applied to the item. But the number of items at the output is the same as in the input.