Help

How to run an automation repeating group one item at a time

Topic Labels: Automations
Solved
Jump to Solution
2184 5
cancel
Showing results for 
Search instead for 
Did you mean: 
jmsheldon
5 - Automation Enthusiast
5 - Automation Enthusiast

I have an automation where I first create a list of records and sort them by priority, then I put them into a repeating group to run scripts on them one at a time. But, it seems as though the repeating group will run those functions with multiple items being processed at a time, not one at a time. 

 

Is there a workaround so that I can process the items within a list one at a time in the repeating group? 

Thanks! 

1 Solution

Accepted Solutions
Ron_Williams
6 - Interface Innovator
6 - Interface Innovator

OK I understand better now. Airtable will for sure run on multiple records concurrently with no logical order to them. Ive dealt with this before. My solution was to allow the first automation to run completely on all records, then manually trigger the second to start. I actually ended up creating an additional field that was populated by the first script with the index, and a formula field index+1. Then I triggered the second automation to start manually with a checkbox on the first record, run the normal process, and as a last step in the automation, I used the index+1 field to find the next record and check the checkbox for that record to start processing it. This effectively makes them process one at a time. Hope that makes sense. 

See Solution in Thread

5 Replies 5
Ron_Williams
6 - Interface Innovator
6 - Interface Innovator

This is one of the limitations of the repeating group. Depending on your workflow, you can actually input the list as a variable directly in your script, then add a for each loop in the script and process them in the correct order. The script can output a list if needed to update records or whatever isn't dependent on timing after it's processed by the script in the correct order. 

@jmsheldon 

Sounds like @Ron_Williams has put you on the right path. I actually don't know very much about scripting, but I just wanted to say that if you can't figure it out with scripting, Make always processes repeating groups one at a time in the sort order that you specify. This is the default behavior of Make, with nothing extra required on your part. Someday I'd love to learn scripting, but for now I do all of my advanced automations this way.

jmsheldon
5 - Automation Enthusiast
5 - Automation Enthusiast

I explored doing this, but if I am trying to process a few hundred records, a for loop within the script in place of the repeating block would go way over the 30-second run time limit. Instead, I have tried to break these out into two separate automations:

1. The first determines which records need to be processed and puts them in order, then updates a Date field within each record from a repeating block, with a 10-second delay in the script before it finishes. 

2. The second automation gets triggered whenever that Date field in the record is updated, then it processes that one record accordingly. This is assuming that an automation itself does not run concurrently for multiple records that have triggered it, but one at a time. 

I'll post an update if this works over the next few days, but it would be great to understand this as well from Airtable Support - whether one Automation will run on multiple records concurrently or one at a time. 

Ron_Williams
6 - Interface Innovator
6 - Interface Innovator

OK I understand better now. Airtable will for sure run on multiple records concurrently with no logical order to them. Ive dealt with this before. My solution was to allow the first automation to run completely on all records, then manually trigger the second to start. I actually ended up creating an additional field that was populated by the first script with the index, and a formula field index+1. Then I triggered the second automation to start manually with a checkbox on the first record, run the normal process, and as a last step in the automation, I used the index+1 field to find the next record and check the checkbox for that record to start processing it. This effectively makes them process one at a time. Hope that makes sense. 

This is great, Ron. Thanks!

I did exactly this, but instead of a checkbox I am using a Date field and the second automation gets triggered whenever that Date field is updated. This way, I can run the same record through the second automation multiple times if-needed, with just overwriting the index and the Date field whenever I need to run it through again.