[BUG] Loop executes 'Done' the same amout of times as 'Loop'

Describe the problem/error/question

Your core functionallity - loops is bugged as hell!

What is the error message (if any)?

There is no error message, however ‘Done’ is executed the same amount of time as ‘Loop’ and what’s more strange is that ‘Done’ is executed firstly and then goes ‘Loop’ thing.

Please share your workflow

Share the output returned by the last node

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): n8n cloud
  • Operating system:

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

@niewiemczego , as far as I can see it behaves as expected. Perhaps your interpretation of what you see in the UI confuses you.

The point is the Loop iterates the set of items fed to it. Therefore, the output shows how many times the iteration took place. However, the final result is a single set of items.

For simplicity, here’s a demo workflow.

It’s execution result is presented in the screenshot below.

Now, lets look closer into the outcome. You might think that “done” produced 6 iterations.

However, that is not so. The dropdown. actually shows that 5 of those iteration were conducted via “loop” output and the last 6th one went through “done” output.

The “done” loop accumulates all the iterations and produces a single set of all the items iterated by the loop. This can be clearly seen from the Wait node that immediately follows the Loop node’s “done” branch.

Again, all works as expected and by design.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.