Help

Trigger Automation

Topic Labels: Automations
1237 2
cancel
Showing results for 
Search instead for 
Did you mean: 
hemendra
4 - Data Explorer
4 - Data Explorer

How can run the python script automatically if we update any record in the airtable.

2 Replies 2
ScottWorld
18 - Pluto
18 - Pluto

Airtable doesn’t support running Python code.

If you want to have Airtable trigger an automation that runs your Python code, you would need to use the Run Python Code modulewhich is part of Make’s 0CodeKit integrations.

If you’ve never used Make before, I’ve assembled a bunch of training resources in this thread:
https://air.tableforums.com/t/make-com-basic-navigation-tips/277

As Scott said, Airtable  does not support running Python code.

You do not state your level of experience with Python, Airtable, or coding in general, so you may already know some of this info.

- One method for triggering an outside process from an Airtable native automation is to call a webhook using a scripting action in the native Airtable automation. For example, you could have a native Airtable automation that uses a script to call a Make scenario that includes the Run Python Code module.

- If you use the "when record updated"  trigger for a native Airtable automation, you may find your automation running more frequently than you expect. A record is considered update with each key press, so if someone types in a text field, the automation may run multiple times before the person is done typing. You many want to consider a more specific automation trigger that the user controls so that you can avoid premature automation runs. You should also be aware of your monthly automation run limit.

- Some systems "poll" Airtable for changes using the Web API. If you use this method, you would need to decided how frequently to ask for changes, and you will need to be aware of the monthly API call limit, which varies depending on your Airtable plan. If you go this method, you many want to use a "Last Modified Time" field, and only query for records that have changed since your last query. This method is more complex to setup than a native Airtable automation, but if you are very comfortable with running Python on your server and are okay with a lag before the Python code runs, this method might work for you.

- It is possible to use the Webhooks portion of the Web API to get notifications based on record changes. However, setting this up is much more complex than using native Airtable native automations. I do not recommend this method for a beginner.