Loop doesn't behave accordingly | or I'm missing something

Describe the problem/error/question

My n8n workflow contains two nested loops:

  • the first one iterates through three different periods, and for each period, the second loop is supposed to iterate through all employees from a Google Sheet.

For example, I have 3 periods and 13 employees. Therefore, the intended executions is that period 1 will loop over 13 employees. Period 2 will loop over 13 employess. Period 3 will loop over 13 employess. And done. Execution finish.

What is happening instead:

  • During the first period, everything works correctly and each employee is processed as expected.

  • However, starting from the second period, the employee loop no longer runs: instead of iterating through each employee, the workflow immediately jumps to the “done” branch. The same behavior occurs in the third period, meaning that only the first period’s employee iterations are actually executed.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: Running version [email protected]

  • Database (default: SQLite):

  • n8n EXECUTIONS_PROCESS setting (default: own, main):

  • Running n8n via (Docker, npm, n8n cloud, desktop app): cloud

  • Operating system:

Thank you for your help.

Sébastien

I found my solution from another topic. The solution was to reset the loop node when the input is the previous node. Bingo.

1 Like

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