Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Run Scripts Automatically?

Topic Labels: Scripting extentions
4443 4
cancel
Showing results for 
Search instead for 
Did you mean: 
AlliAlosa
10 - Mercury
10 - Mercury

Hi all! Starting to dig in to the scripting block a bit more… is there a way to force the script to run automatically?

Wrote a script to watch a table and make sure everything is linked to the same record on a junction table… but this is rendered useless if I have to train people to hit the button every time they login. :slightly_smiling_face:

4 Replies 4

Okay, so you have created a useless script. This is one of the pitfalls lacking good requirements planning.

As you now know, there is no way to encourage scripts to run on a specified interval. Nor is there an event-model in Airtable that might recognize when a script should fire. I believe both of these are likely features in Airtable’s future, but until then your options are limited.

  1. Write the script block in a way that causes it to always run looking for the linking conditions to process. This involves a while(true) loop that never evaluates to false. There are two key issues with this - (a) Airtable might not like it; it’s using server resources day and night, and (b) it requires your browser to be live and uninterrupted to run the block 24/7.

  2. Move the script to a proper API-driven approach that fires every ten minutes.

Welp, thanks for the advice. I have this being done automatically already with Zapier, but was hoping to be able to save some steps here and there by moving it to the scripting block. :woman_facepalming:

Yep - makes sense and even more so in this post.

If you are using Zapier to transform or ingest data AND the business requirement calls for lights-out processing (automatically invoked), a script block is not likely to compete for that business because there are presently no apparent ways to invoke a script block via the API or via a direct web service call into the script block.

Thomas_Winegard
5 - Automation Enthusiast
5 - Automation Enthusiast

@AlliAlosa Could you share the script you wrote originally? Now that automation triggers exist for scripts. I might find use in your orginal script.

Thanks,
Tom