Describe the problem/error/question
Is there a way to trigger only once the node following a loop over items?
In my example, the final Slack node is triggered 224 times with a total of 87472 items and I don’t know where the 87472 come from. The Slack node has the Execute once option checked.
Other issue: the Twilio node gives both error and success, why is that? The error is real (Twilio account issue).
What is the error message (if any)?
Please share your workflow
Don't want to display my credentials, so just a print screen.
Share the output returned by the last node
I expect 1 execution, not 224.
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
Hi @Thibault_Hosman
Welcome back!
Execute once executes 1 time per workflow execution, not per loop. Since the node is inside the loop (fan-out of items), it gets called once per item, resulting in 224 executions.
solution: Move the Slack node outside the loop, or use a Merge node (Mode: Wait for all) before Slack to consolidate everything into 1 item.
Twilio returns error and success at the same time because the node is processing multiple items.
Solution: Disable Continue On Fail if you want everything to fail, or filter errors and successes with an IF node after Twilio.
Hi @Thibault_Hosman Welcome!
The Slack node runs 224 times because it’s still being called once per loop batch, even with “Execute once” on. To fire it only once, send the loop output into an Aggregate node so you end up with a single item, then place Slack after that final node. As for Twilio showing both success and error that usually means some loop items passed and some failed, so I would enable “Continue on Fail” and add a small error‑handling branch that checks the Twilio results before sending your final Slack message. Adding a workaround like a If block would also work but can break in some cases, let me know if this helps.
Hello there, thank you both for your answers.
I must be doing something wrong, aggregate node does not reduce the trigger of the Slack node to one. And the 157437 items before the aggregate node do not make any sense to me.
As for the Twilio node, I checked wether the result was not empty and the condition was true, then I checked that it was different from [{}] which is the result I have when there is an error and it is sill passing the condition.
Thank you.
Kind regards.
Did you try using the Limit node?
This is the result of using loops
, in most cases you don’t need loops since n8n already handles this by design, there are only a few cases where using loops is appropriate..
Hello there, thank you for your answer.
When I was working on this process, without the loop I could not achieve my goal, maybe there is something I don’t understand but I can’t spend days on this.
Unfortunately limit does not solve my issue.