Skip to main content
Solved

Run the same script on a record create or record update?

  • February 19, 2024
  • 1 reply
  • 33 views

Forum|alt.badge.img+6

Is there a way to share a script between a record-create automation and a record-update automation?

Best answer by kuovonne

Each script in each automation is considered a standalone script from Airtable's point of view, even if the code is exactly the same.

Here are some options:

- Manually copy and paste the script into both automations and manually keep any changes in sync. This is the method that I tend to use.


- Have three different automations. Have both the record-create automation and the record-update automation trigger a third automation that contains the script. This way the script is stored in only one place. However, I rarely use this method--it takes an additional automation slot; it takes extra automation runs, it requires an additional field to trigger the scripting automation, and it takes longer to run.

1 reply

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • February 19, 2024

Each script in each automation is considered a standalone script from Airtable's point of view, even if the code is exactly the same.

Here are some options:

- Manually copy and paste the script into both automations and manually keep any changes in sync. This is the method that I tend to use.


- Have three different automations. Have both the record-create automation and the record-update automation trigger a third automation that contains the script. This way the script is stored in only one place. However, I rarely use this method--it takes an additional automation slot; it takes extra automation runs, it requires an additional field to trigger the scripting automation, and it takes longer to run.