Iterate through data sets in your automation
The Loop Data block is a powerful tool that lets you repeat actions over a set of data. Think of it like a “repeat for each” instruction - for example, sending an email to each customer in a list, or clicking every product link on a page.
A brief note explaining what this loop will do. This helps you track your automation’s purpose.
Good Examples:
Bad Examples:
Why they’re bad: Too vague, doesn’t specify what data is being processed
Choose what type of data to iterate through:
Description: Loop through rows in a data table or spreadsheet data.
Features:
☐ Each row becomes available as variables
☐ Process data row by row
☐ Works with CSV, Excel, or database exports
Example Use Case: Processing a customer list with columns for name, email, and status
Description: Loop through a sequence of numbers, counting up or down.
Features:
☐ Define start and end numbers
☐ Control count direction
☐ Set custom step intervals
Example Use Case: Navigate through pages 1-10 of search results
Description: Loop through items stored in a variable from previous steps.
Features:
☐ Access array elements sequentially
☐ Use data from earlier automation steps
☐ Process lists dynamically
Example Use Case: Visit each URL from a list of collected product links
Description: Loop through multiple elements found on a webpage.
Features:
☐ Process matching elements one by one
☐ Use CSS selectors or XPath
☐ Handle dynamic content
Example Use Case:
Click each “Add to Cart” button matching .cart-button
Configure how the loop processes your data:
Description: Set the maximum number of items to process in this loop.
Key Points:
☐ Set to 0
for no limit
☐ Prevents infinite loops
☐ Perfect for testing
Best Practice: Start with a small number (e.g., 5) when testing new automations
Description: Choose which item to start processing from.
Key Points:
☐ 0
starts from the first item
☐ Skip already processed items
☐ Resume from specific point
Best Practice: Use with “Resume Last Workflow” for handling large datasets
Resume Last Workflow: Continue from where previous run stopped
Reverse Loop Order: Process items in reverse order
Process customer records in batches of 100. If interrupted, resumes from last processed record. Perfect for large customer databases.
a.product-link
Finds all product links on a page and processes each one. Useful for price monitoring or product data extraction.
Navigate through 10 pages of results. Common for search results or product catalogs where data spans multiple pages.
Each loop iteration provides these variables:
loop.current
- Current item being processedloop.index
- Current iteration number (0-based)loop.isFirst
- True if first iterationloop.isLast
- True if last iterationIterate through data sets in your automation
The Loop Data block is a powerful tool that lets you repeat actions over a set of data. Think of it like a “repeat for each” instruction - for example, sending an email to each customer in a list, or clicking every product link on a page.
A brief note explaining what this loop will do. This helps you track your automation’s purpose.
Good Examples:
Bad Examples:
Why they’re bad: Too vague, doesn’t specify what data is being processed
Choose what type of data to iterate through:
Description: Loop through rows in a data table or spreadsheet data.
Features:
☐ Each row becomes available as variables
☐ Process data row by row
☐ Works with CSV, Excel, or database exports
Example Use Case: Processing a customer list with columns for name, email, and status
Description: Loop through a sequence of numbers, counting up or down.
Features:
☐ Define start and end numbers
☐ Control count direction
☐ Set custom step intervals
Example Use Case: Navigate through pages 1-10 of search results
Description: Loop through items stored in a variable from previous steps.
Features:
☐ Access array elements sequentially
☐ Use data from earlier automation steps
☐ Process lists dynamically
Example Use Case: Visit each URL from a list of collected product links
Description: Loop through multiple elements found on a webpage.
Features:
☐ Process matching elements one by one
☐ Use CSS selectors or XPath
☐ Handle dynamic content
Example Use Case:
Click each “Add to Cart” button matching .cart-button
Configure how the loop processes your data:
Description: Set the maximum number of items to process in this loop.
Key Points:
☐ Set to 0
for no limit
☐ Prevents infinite loops
☐ Perfect for testing
Best Practice: Start with a small number (e.g., 5) when testing new automations
Description: Choose which item to start processing from.
Key Points:
☐ 0
starts from the first item
☐ Skip already processed items
☐ Resume from specific point
Best Practice: Use with “Resume Last Workflow” for handling large datasets
Resume Last Workflow: Continue from where previous run stopped
Reverse Loop Order: Process items in reverse order
Process customer records in batches of 100. If interrupted, resumes from last processed record. Perfect for large customer databases.
a.product-link
Finds all product links on a page and processes each one. Useful for price monitoring or product data extraction.
Navigate through 10 pages of results. Common for search results or product catalogs where data spans multiple pages.
Each loop iteration provides these variables:
loop.current
- Current item being processedloop.index
- Current iteration number (0-based)loop.isFirst
- True if first iterationloop.isLast
- True if last iteration