Help

Is there a way to run a script in a batch?

2736 5
cancel
Showing results for 
Search instead for 
Did you mean: 
travmilne
5 - Automation Enthusiast
5 - Automation Enthusiast

I currently have a script that is set to execute on the click of a button. It works really well, but I've increased the amount of records I'm doing this with and clicking the button 500 times, one record at a time, is quite tedious.

The script is pulling in information from an API and due to AirTable's 30 second limit, it's only capable of doing a handful of records before failing.

I've been trying to work with the automations tool to somehow mimic the clicking of the button one record at a time so that it can run the script for one record, finish the script, and then move to the next record, mimic the click of a button to start the script, and continue this until it's done it for each of the records.

Is this possible at all? I've tried doing it for new records added to a view, but I would still have to add each record to the view one by one as it will group the records together and try to do them all at once when they're added to the view.

5 Replies 5

Are you running the script as an automation that is triggered by. Button in an interface?

 

When I have to process a lot of records, I use Scripting extension and write the script to process all the records in a view. I set the filters to show whichever records I want to process, click the script for scripting extension once, and then sit back and let the script run. This method uses up no automation runs and has no time limits or limits on the number of API calls. It does require knowing knowing enough about scripting to write the script to process all the records in a view. Sometimes that change is very easy, and other times it isn’t, depending on how the original script is written. 

Sorry for the not explaining it better originally.

I originally setup the script outside of any type of automation, solely trigged by the click of a button via script extension. That has worked well, but with the increased number of records I'm working with I need to try and automate the running of the script, rather than clicking on a button for each record to trigger the script to run.

I've tried to use the automations tool, but have run into a dead end.

The script is calling an API and it results in written content being input into a specific column for the record. I believe I would need to have it run the script in full for one record, then once completed move to the next record and have it run again.

Is this possible?

 

 

If you really need the script to run from an interface button, you could write the script so that it processes as many records in a view that it can, but still stop before hitting any of the limits. The system should also be set up so that the script can be chained together across multiple scripting actions so that you can repeat the script in another action in case there are records not yet processed. You may be able to complete all the records in a single  automation run, give that you can have 25 actions in a single automation run. If you might need more than one automation, you can either click the button again after the first automation run finishes, or you can set up a system where the first automation run triggers another automation if there are more records to process. 

Depending on the details, the answer is either yes, or yeeeeeeeeeees. 😂 Some scripts that trigger an action, that need to be clicked 500 times for an action to execute 500 times can be very straight forward to convert into a one-click affair, or, they can be a bit of a under-scoped nightmare with dragons lurking. We'd need to see some kind of example script/screenshots to judge if it's a 2 second solution or 2 day solution... or 2 week... month? ... Years?

perrytancredi
5 - Automation Enthusiast
5 - Automation Enthusiast

Airtable now supports this with their Repeating Groups function: https://support.airtable.com/v1/docs/repeating-groups-of-automation-actions