Airtable
Interact with Airtable app
Airtable | Everyone's app platform
Airtable
Website
apikey should be generated in your account :
https://airtable.com/account
airtable.com
You should find it there:
Then go to :
REST API - Airtable
REST API - Airtable
and choose the workspace you wanna connect and on the Authentication section, you should see :
database_key is the value between v0/ and /
table_name is the value after the last /

Get

1
from naas_drivers import airtable
2
api_key = "******"
3
db_key = "appuBFPzX94pEqXUJ"
4
table = "Opportunities"
5
view = "MyView" # the name of your view in airtable
6
data = airtable.connect(api_key, db_key, table).get(view=view, maxRecords=20)
Copied!

Send

1
from naas_drivers import airtable
2
api_key = "******"
3
db_key = "appuBFPzX94pEqXUJ"
4
table = "Opportunities"
5
view = "MyView" # the name of your view in airtable
6
data = airtable.connect(api_key, db_key, table).send({'Name': 'Brian'})
Copied!

Search

1
from naas_drivers import airtable
2
api_key = "******"
3
db_key = "appuBFPzX94pEqXUJ"
4
table = "Opportunities"
5
view = "MyView" # the name of your view in airtable
6
data = airtable.connect(api_key, db_key, table).search('Name', 'Tom')
Copied!

Update

1
from naas_drivers import airtable
2
api_key = "******"
3
db_key = "appuBFPzX94pEqXUJ"
4
table = "Opportunities"
5
view = "MyView" # the name of your view in airtable
6
data = airtable.connect(api_key, db_key, table).update_by_field('Name', 'Tom', {'Phone': '1234-4445'})
Copied!

Delete

1
from naas_drivers import airtable
2
api_key = "******"
3
db_key = "appuBFPzX94pEqXUJ"
4
table = "Opportunities"
5
view = "MyView" # the name of your view in airtable
6
data = airtable.connect(api_key, db_key, table).delete_by_field('Name', 'Tom')
Copied!

Connect

You can also save your connection and don't repeat it for each method.
1
from naas_drivers import airtable
2
api_key = "******"
3
db_key = "appuBFPzX94pEqXUJ"
4
table = "Opportunities"
5
view = "MyView" # the name of your view in airtable
6
data = airtable.connect(api_key, db_key, table)
7
data = at.get(view='MyView', maxRecords=20)
Copied!

Official documentation

REST API - Airtable
REST API - Airtable
Documentation