Loop on Loop problem

Hello,

I have a problem with a loop that is within a loop.
To explain the scenario: The first retrieves a list of players, then loops over this list, and the second searches another table for the data that exists for this player. There may be several. And after that, I loop over the row(s), and I want to delete them. and then move on to the next player, but it doesn’t work. Could you help me?

Thank you

Information on your n8n setup

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

hello @Larmier_Anthony

Nested Loops wouldn’t work.

And you can remove the first loop node, it doesn’t do anything (actually the second one also may be removed).

Hello , thanks for the quick reply. Why wouldn’t this work? Is it an N8N issue?

It’s not an issue, it’s how the iteration mechanism works in n8n. Nested loops are too difficult to use and requires significant amount of work.

Better to switch to sub-workflows

1 Like

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