By default, automation actions in Bardeen process records sequentially, one action at a time. For example, if you scrape 10 links, all 10 links will first be scraped, and only then will they all be exported together to a Google Sheet.
However, there are cases where we need to process records one by one – where each link is scraped and added to the sheet immediately before moving on to the next. For this scenario, we use Loops.
Adding a Loop to an Automation
You can add a loop after any action you want to split into smaller steps. Let’s look at an example:
Example Use Case
Suppose we have an automation that gets a table from a Google Sheet and scrapes LinkedIn profile links from that table. Here’s how to add and use a loop:
- Add a Loop after the “Get Table from a Google Sheet” action.
- Connect the Loop action to the previous action (this will split the table into rows).
- Automation will now interpret it as “For each table row”.
All subsequent actions must be connected to the Loop instead of the original Google Sheet action. In this example:
- Connect the scraping action to Loop 2 > LinkedIn Profile Column.
Results and Benefits of Using Loops
After implementing a flow with loops, you will notice the following changes:
- Automations will process records one by one. For example, each LinkedIn profile will be scraped and added to the Google Sheet immediately before the next scrape begins.
- This approach prevents data loss in case an automation fails. If you process many records at once and the automation stops midway, some scraped data may not get exported. Loops ensure every record is processed individually and added to the sheet step by step.
Conclusion
Loops are a powerful way to split automation actions and process records step by step. Use them whenever you want to:
- Prevent data loss from automation failures.
- Ensure records are processed one at a time.
By adding a loop and connecting actions correctly, you can optimize automations and ensure they run reliably, even when handling large datasets.
Comments
0 comments
Please sign in to leave a comment.