PluginsAirtable
Airtable Database Schema
Database entities and querying synced Airtable data
The Airtable plugin syncs base and record metadata to your database for fast queries.
New to Corsair? Learn about database operations, data synchronization, and multi-tenancy.
Full Implementation: See the Airtable plugin source code.
Synced Entities
- bases - Airtable base metadata
- records - Synced record data per table
Database API
const bases = await corsair.airtable.db.bases.search({
data: { name: "Project Tracker" },
});Bases
Schema
{
id: string; // Airtable base ID (appXXX...)
name: string;
permission_level: string; // owner | create | editor | commenter | read
}Querying Bases
const bases = await corsair.airtable.db.bases.search({
data: { permission_level: "owner" },
});Records
Schema
{
id: string; // Airtable record ID (recXXX...)
base_id: string; // Parent base ID
table_id: string; // Parent table ID
table_name?: string;
created_time: string; // ISO timestamp
fields: Record<string, unknown>; // All record field values
}Querying Records
Search by table:
const records = await corsair.airtable.db.records.search({
data: { table_name: "Tasks" },
});Example: Multi-Tenancy Query
const tenant = corsair.withTenant("user-123");
const records = await tenant.airtable.db.records.search({
data: { base_id: "appXXXXXXXXXXXXXX" },
});