FabricFabricSDK
Plugins

Airtable

Read and write records in Airtable bases with webhook payload polling.

Authentication

TypeDefaultDetails
api_keyPersonal Access Token (pat_...)
oauth_2Airtable OAuth with PKCE

Airtable OAuth requires PKCE and uses scopes:

  • data.records:read
  • data.records:write
  • schema.bases:read

Endpoints

PathRiskDescription
records.listreadList records in a table.
records.getreadGet a single record.
records.createwriteCreate up to 10 records in one call.
records.updatewritePatch up to 10 records (partial fields).
records.deletedestructiveDelete up to 10 records.
webhooks.listPayloadsreadPoll the buffered payloads for a webhook subscription.

records.list

List records in a table with filtering, sorting, and pagination.

Input:

FieldTypeRequiredDescription
baseIdstringBase ID
tableIdOrNamestringTable ID or name
viewstringView name to filter by
fieldsstring[]Only return these field names
filterByFormulastringAirtable formula filter
pageSizenumberMax records per page (max 100)
offsetstringPagination offset
sortarraySort configs: { field: string; direction?: "asc" | "desc" }

Output: { records: AirtableRecord[]; offset?: string }

records.get

Get a single record by ID.

Input:

FieldTypeRequiredDescription
baseIdstringBase ID
tableIdOrNamestringTable ID or name
recordIdstringRecord ID

Output: AirtableRecord

records.create

Create up to 10 records in one call.

Input:

FieldTypeRequiredDescription
baseIdstringBase ID
tableIdOrNamestringTable ID or name
recordsarrayArray of { fields: Record<string, unknown> }
typecastbooleanAuto-convert types

Output: { records: AirtableRecord[] }

records.update

Update up to 10 records with partial fields.

Input:

FieldTypeRequiredDescription
baseIdstringBase ID
tableIdOrNamestringTable ID or name
recordsarrayArray of { id: string; fields: Record<string, unknown> }
typecastbooleanAuto-convert types

Output: { records: AirtableRecord[] }

records.delete

Delete up to 10 records.

Input:

FieldTypeRequiredDescription
baseIdstringBase ID
tableIdOrNamestringTable ID or name
recordsstring[]Array of record IDs to delete

Output: { records: Array<{ id: string; deleted: boolean }> }

webhooks.listPayloads

Poll buffered webhook payloads for a subscription. Airtable webhooks require polling — push events only notify "something changed."

Input:

FieldTypeRequiredDescription
baseIdstringBase ID
webhookIdstringWebhook ID
cursornumberPagination cursor
limitnumberMax payloads

Output: { payloads: unknown[]; cursor: number; mightHaveMore: boolean; payloadFormat: "v0" }

Usage

import { createFabric } from "@fabricorg/integrations";
import { airtable } from "@fabricorg/integrations/plugins";

const fabric = createFabric({
  plugins: [airtable({ apiKey: process.env.AIRTABLE_PAT })],
});

// List records
const { records } = await fabric.airtable.api.records.list({
  baseId: "appABCDEF123456",
  tableIdOrName: "Tasks",
  filterByFormula: '{Status} = "In Progress"',
  sort: [{ field: "Due Date", direction: "asc" }],
});

// Create records
const { records: created } = await fabric.airtable.api.records.create({
  baseId: "appABCDEF123456",
  tableIdOrName: "Tasks",
  records: [
    { fields: { Name: "New Task", Status: "Todo", Priority: "High" } },
  ],
});

Webhooks

Airtable's webhook contract requires polling. Push events notify "something changed in baseId," then you poll for payloads via webhooks.listPayloads. The portal's webhook bridge handles the poll loop.

Direct webhook handlers are not declared on this plugin.

Types

interface AirtableRecord<Fields = Record<string, unknown>> {
  id: string;
  fields: Fields;
  createdTime: string;
}