Hello there,
I’m experiencing an infinite loop in my workflow and would really appreciate your insights.
Context:
- The workflow starts by listing multiple
.json
files from a Google Drive folder. - Each file contains an object with a string key and an array of sub-objects (let’s call them entries).
- I loop through the files one by one using
SplitInBatches
. - For each file:
- I download and parse it.
- Then I use a
Code
node to split the array inside the JSON into individual items. - These items are then supposed to be processed one by one in another loop.
Problem:
As soon as the splitting happens in the Code
node, the number of executions explodes.
- The first batch is processed normally.
- But right after that, thousands of executions start running — even though there are only a few dozen JSON files in total.
- It’s as if the newly generated items were being re-injected into the main file-processing loop, causing an unintended recursive loop.
Thanks for your advice.
Share the output returned by the last node
Information on your n8n setup
- **n8n version: 1.9
- Database (default: SQLite):
- Running n8n via (Docker):