Overview
This node implements a looping mechanism within n8n workflows, allowing repeated execution of subsequent nodes or actions. It is useful for scenarios where you need to iterate over a set of items or repeatedly perform a task until a condition is met. For example, it can be used to process batches of data, retry operations multiple times, or create custom loops in automation workflows.
Use Case Examples
- Processing a list of items in batches by looping through each batch.
- Retrying an API call multiple times until a successful response is received.
- Creating a custom loop to perform a series of actions repeatedly based on dynamic conditions.
Output
JSON
loopCount- The current iteration count of the looploopData- Data associated with the current loop iteration
Dependencies
- An API key credential for the loop API
Troubleshooting
- Ensure the loop API credential is correctly configured to avoid authentication errors.
- If the loop does not behave as expected, verify the workflow logic and conditions controlling the loop iterations.
- Timeouts or infinite loops can occur if exit conditions are not properly set; always define clear stopping criteria.