What it does
An n8n example that shows how to read the running index of a Split In Batches loop with currentRunIndex. A Function node generates sample data, the batch size is set to one, and an IF node ends the loop when the index reaches a value you choose. A Set node then shows an end-of-loop message.
Use cases
- 01Count the iterations of a loop in an n8n workflow
- 02Stop a batch process after a chosen number of runs
- 03Learn how to branch a workflow on the loop index