@kody/airtable
Read and update Airtable bases, tables, records, and comments through OAuth or a PAT.
README.md
113 lines · 5.1 KB · Markdown@kody/airtable
Intent
Provide reusable, account-agnostic Airtable helpers so Kody agents can read and
update bases, tables, records, and comments through a saved airtable /
airtable-* OAuth integration or a personal access token — without
hand-rolling REST. Mutations are previewable with dryRun: true and only
run live after confirm: true.
This listing is meant to be forked. After you fork, connect your Airtable
workspace. Do not treat the live @kody/airtable package storage as yours.
Share this listing as https://kody.codes/@kody/airtable
What it does
- List or inspect bases, tables, records, and comments
- Create, update, or delete records after explicit confirmation
- Create comments after explicit confirmation
- Call an unwrapped Airtable REST path through
./request - Connect more than one Airtable account via
integrationName/account
Prerequisites / setup
Airtable has no built-in Kody OAuth app. Choose one lane:
| Lane | When to use | Credential |
|---|---|---|
| OAuth (recommended) | Multi-account, refresh tokens, shared helpers | Saved integration airtable or airtable-<purpose> |
| Personal access token | Fastest for a single workspace / personal scripts | User secret airtablePat (or airtablePat-<purpose>) |
Both lanes send Authorization: Bearer …. Required API host:
api.airtable.com. Approve it in the account secrets UI.
Lane A — BYO OAuth
- Register an OAuth integration at https://airtable.com/create/oauth
- Set the redirect URI exactly to
https://kody.codes/connect/oauth - Generate a client secret (Airtable token exchange uses HTTP Basic when a secret exists). Enable PKCE — Airtable requires S256 PKCE on every authorize request.
- Under Scopes, enable the scopes this package uses
(
data.records:read,data.records:write,data.recordComments:read,data.recordComments:write,schema.bases:read). - Connect while signed in to Kody:
- Paste the Airtable client id and client secret into the Kody wizard (never
into chat). Approve host
api.airtable.com. - Reconnect later with https://kody.codes/connect/oauth?provider=airtable
OAuth authorize URL: https://airtable.com/oauth2/v1/authorize. Token URL:
https://airtable.com/oauth2/v1/token. Flow: confidential (client secret) plus
S256 PKCE. Token exchange style: basic-form. Airtable scopes are
space-separated.
To connect a second workspace, change provider (for example
provider=airtable-work) and pass integrationName: 'airtable-work' on every
call.
Lane B — Personal access token
- Create a token at https://airtable.com/create/tokens
- Grant the scopes above and add the bases this agent should see.
- Save it (do not paste the value in chat):
For a second workspace/token, use a distinct secret name such as
airtablePat-work and pass secretName: 'airtablePat-work' (or
account: 'work', which resolves to airtable-work / airtablePat-work).
Scopes
| Scope | Needed for |
|---|---|
schema.bases:read | list/get bases and tables |
data.records:read | list/get records |
data.records:write | create/update/delete records |
data.recordComments:read | list comments |
data.recordComments:write | create comments |
viewer and smoke-test call /meta/whoami, which does not require a scope.
This package does not request user.email:read.
Agents: see AGENTS.md for import paths, smoke, and dryRun.
Done when
- The
airtableOAuth integration is connected orairtablePatis saved; hostapi.airtable.comis approved - Smoke test returns
{ ok: true }(live whoami without email when credentials exist, or setup URLs when they do not) - Mutations refuse without
confirm: true;dryRun: truenever calls Airtable
Branding
The community icon is Airtable's official product mark as published at https://airtable.com/images/favicon/mstile-144x144.png (the current isometric logomark). Pixels are unmodified. Airtable® and the Airtable trademark are registered trademarks of Formagrid Inc dba Airtable.