Connect your app to Airtable
Airtable is a friendly place for a team to manage records. Your app should read from it carefully, and never with a token in the browser.

Key takeaways
- Create a personal access token scoped to only the bases and permissions your app needs, and store it in Backend → Secrets.
- Airtable allows 5 requests per second per base. Sync records into your database and serve visitors from there.
- Reference fields by ID, expand linked records yourself, and copy attachments to your own storage because Airtable file URLs are temporary.
To connect an app to Airtable, create a personal access token in your Airtable account with the scopes and base access the app needs, store it as a backend secret, and call the Airtable Web API from a server function. Use the API to sync records into your own database on a schedule and when Airtable tells you something changed. Your visitors read from your database; your team keeps editing in Airtable. That arrangement respects Airtable's rate limit and keeps the token off the internet.
What you'll build
A conference team manages talks in an Airtable base: a `Talks` table (title, abstract, status, room, start time, speaker) linked to a `Speakers` table (name, bio, photo, company). The public schedule site shows only talks with status `Confirmed`, with speaker cards and photos. Attendees can submit a session feedback form, and those responses land back in an Airtable `Feedback` table for the organizers.
What you need
- An Airtable account with access to the base. Check your plan's API call allowance on Airtable's pricing page; free plans have lower monthly limits.
- A personal access token created in Airtable's developer hub. Give it the narrowest scopes that work: `data.records:read` for the sync, `data.records:write` only if the app writes feedback, and `schema.bases:read` if you want the agent to inspect field types. Grant access to this one base, not your whole workspace.
- The token in [Backend → Secrets](https://docs.startbase.ai/cloud/cloud-secrets) as `AIRTABLE_TOKEN`, and the base ID (it starts with `app`) as `AIRTABLE_BASE_ID`.
- A backend for the edge functions and the tables the sync writes to.
The rate limit shapes the design
Airtable's Web API allows 5 requests per second per base, and a client that goes over gets HTTP 429 and must wait 30 seconds before calls succeed again. List requests return at most 100 records per page, and create or update calls take at most 10 records each. Do the arithmetic: 600 talks is six list calls, which is fine for a sync. A schedule page that queried Airtable directly would fail the first time 20 people opened it in the same second.
So the sync function pages through `Talks` with the `offset` token, waits about 250 ms between calls to stay under the limit, and upserts into `talks` and `speakers` tables keyed by the Airtable record id (`rec...`). Run it every 5 minutes with a scheduled job, plus on demand from an admin button. If you need faster updates, Airtable's webhooks API can notify a function when the base changes; that function should just trigger the same sync rather than trust the payload alone.
Airtable data quirks to handle
- 01Linked records arrive as ID arrays. A talk's `Speaker` field is `["recA1b2C3"]`, not a name. Sync both tables and join in your database, or you will make one extra request per talk.
- 02Empty fields are missing, not null. A talk with no room simply has no `Room` key in its `fields` object. Default every field explicitly.
- 03Field names change. Organizers rename `Start` to `Start time` and your mapping breaks. Request fields by field ID (`fld...`) with the option to return field IDs, and keep a small mapping table in code.
- 04Attachment URLs expire. Airtable serves attachments from temporary URLs that stop working after a few hours. Copy each speaker photo into your own file storage during the sync, keyed by the attachment id so unchanged photos are not copied again.
- 05Select options are free text. A status of `confirmed` and `Confirmed ` (trailing space) are different strings. Normalize before filtering.
Writing back to Airtable
Feedback goes the other way. The form posts to your own `submit-feedback` function, which validates the input, checks rate limits per attendee, and saves to a `feedback` table first. A second step pushes unsent rows to Airtable in batches of up to 10, with `typecast` off so a bad value fails loudly instead of creating a new select option, and marks them `pushed_at`. If Airtable is down or rate-limited, nothing is lost.
Keep the direction of each table clear: `Talks` and `Speakers` flow from Airtable to the app, `Feedback` flows from the app to Airtable. Two-way sync of the same table means conflict rules, and almost nobody needs that.
Let Airtable do the filtering
The list endpoint accepts a view name and a `filterByFormula`. Create a view in Airtable called `Public schedule` that filters to confirmed talks and hides internal fields, and have the sync read only that view. Now the organizers control what is public with a tool they already understand, and a talk moved back to Draft disappears from the site on the next sync without anyone touching code. One caution: a view is easy to edit by accident. Keep the status filter in your sync code as well, so a broken view cannot publish everything.
Paste-ready brief
Build a public conference schedule from my Airtable base. Token is in Secrets as AIRTABLE_TOKEN, base id as AIRTABLE_BASE_ID. Write an edge function sync-airtable that pages through the Talks and Speakers tables (100 per page, at most 4 requests per second, back off 30 seconds on a 429), upserts into talks and speakers tables keyed by Airtable record id, resolves linked speakers by id, copies speaker photos into storage once per attachment id, and logs each run with counts and errors. Run it every 5 minutes and add an admin Sync now button. The site shows only talks whose status is Confirmed, grouped by day and room. Add a feedback form per talk that saves to a feedback table, then pushes new rows to the Airtable Feedback table in batches of 10.
Pitfalls
- Token in the frontend. An Airtable token in client code lets anyone read, and possibly rewrite, your base. It only ever lives in Secrets and edge functions.
- An over-scoped token. A token with write access to every base in your workspace turns one leak into a disaster. One app, one base, minimum scopes.
- Forgetting deletions. A sync that only upserts never notices a talk deleted in Airtable. Track the record ids seen in each run and unpublish the rest.
- Private fields leaking. The base probably holds speaker emails and internal notes. Sync only the fields the public site needs, so a bug in a page cannot show what it never received.
- Retry storms. Retrying a 429 immediately extends the penalty. Wait the full 30 seconds, then resume.
If the team is open to moving off Airtable later, the synced tables are already your app's real data model, which makes the move a matter of building admin screens. The admin panel guide covers that step.
Frequently asked questions
What is the Airtable API rate limit?
Five requests per second per base. Going over returns HTTP 429, and you need to wait 30 seconds before requests succeed again. Design around it by syncing into your own database.
Can I call Airtable directly from my website?
Not safely. The request needs your access token, and anything in the browser is public. Call Airtable from an edge function with the token in Backend → Secrets.
Why did my Airtable images stop loading?
Airtable attachment URLs are temporary and expire after a few hours. Copy files into your own storage during the sync and serve them from there.
Do I need Airtable webhooks?
Only when a few minutes of delay is too much. A scheduled sync every 5 minutes covers most cases; a webhook can trigger the same sync sooner.

