Airtable
Connect & Ingest data from Airtable
Airtable is a cloud-based platform that combines the simplicity of a spreadsheet with the power of a database. The Sling Airtable connector automatically discovers all accessible bases and tables, creating a dynamic endpoint for each table.
CLI Pro Required: APIs require a CLI Pro token or Platform Plan.
Setup
The following credentials and inputs are accepted:
Secrets:
api_key(required) -> Your Airtable Personal Access Token
Inputs (optional):
last_modified_field_map(optional) -> A nested map of base names to table names to the field name containing the last modified timestamp. Used for incremental sync.
Getting Your API Key
Click "Create new token"
Give your token a name (e.g., "Sling Integration")
Add the following scopes:
data.records:read- To read records from tablesschema.bases:read- To discover bases and tables
Add access to the bases you want to sync (or all bases)
Click "Create token" and copy the token (it starts with
pat)
Using sling conns
sling connsHere are examples of setting a connection named AIRTABLE. We must provide the type=api property:
Environment Variable
Sling Env File YAML
See here to learn more about the sling env.yaml file.
With incremental sync configuration:
Replication
Here's an example replication configuration to sync Airtable tables to a PostgreSQL database:
This replication syncs all Airtable tables to PostgreSQL using full-refresh mode, except for sales_crm_contacts which is disabled.
Dynamic Endpoints
The Airtable connector uses dynamic endpoint discovery. When you connect, Sling automatically:
Fetches all accessible bases
For each base, fetches all tables
Creates an endpoint for each table named
{base_name}_{table_name}in snake_case
For example, if you have a base called "Sales CRM" with tables "Contacts" and "Deals", Sling creates:
sales_crm_contactssales_crm_deals
To discover available endpoints:
Each record includes the following metadata fields in addition to your table columns:
_id- The Airtable record ID_created_time- When the record was created_base_id- The Airtable base ID_base_name- The base name_table_id- The Airtable table ID_table_name- The table name
Incremental Sync
To enable incremental sync for a table, you must specify which field contains the "last modified" timestamp using the last_modified_field_map input.
Example env.yaml with incremental sync:
Example replication with incremental mode:
If you are facing issues connecting, please reach out to us at [email protected], on discord or open a Github Issue here.
Last updated
Was this helpful?