Airtable

Learn how to use Airtable with Composio

Overview

SLUG: AIRTABLE

Description

Airtable merges spreadsheet functionality with database power, enabling teams to organize projects, track tasks, and collaborate through customizable views, automation, and integrations for data management

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to data.records:read,data.records:write,data.recordComments:read,data.recordComments:write,schema.bases:read,schema.bases:write,user.email:read
token
stringRequired
generic_api_key
stringRequired

Connecting to Airtable

Create an auth config

Use the dashboard to create an auth config for the Airtable toolkit. This allows you to connect multiple Airtable accounts to Composio for agents to use.

1

Select App

Navigate to Airtable.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Airtable Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using OAuth2

1from composio import Composio
2
3# Replace these with your actual values
4airtable_auth_config_id = "ac_YOUR_AIRTABLE_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/application
6
7composio = Composio()
8
9
10def authenticate_toolkit(user_id: str, auth_config_id: str):
11 connection_request = composio.connected_accounts.initiate(
12 user_id=user_id,
13 auth_config_id=auth_config_id,
14 )
15
16 print(
17 f"Visit this URL to authenticate Airtable: {connection_request.redirect_url}"
18 )
19
20 # This will wait for the auth flow to be completed
21 connection_request.wait_for_connection(timeout=15)
22 return connection_request.id
23
24
25connection_id = authenticate_toolkit(user_id, airtable_auth_config_id)
26
27# You can also verify the connection status using:
28connected_account = composio.connected_accounts.get(connection_id)
29print(f"Connected account: {connected_account}")

Using Bearer Token

1from composio import Composio
2
3# Auth config ID created above
4airtable_auth_config_id = "ac_YOUR_AIRTABLE_CONFIG_ID"
5
6# UUID from database/application
7user_id = "0000-0000-0000"
8
9composio = Composio()
10
11
12def authenticate_toolkit(user_id: str, auth_config_id: str):
13 # Replace this with a method to retrieve the Bearer Token from the user.
14 bearer_token = input("[!] Enter bearer token")
15 connection_request = composio.connected_accounts.initiate(
16 user_id=user_id,
17 auth_config_id=auth_config_id,
18 config={"auth_scheme": "BEARER_TOKEN", "val": bearer_token}
19 )
20 print(f"Successfully connected Airtable for user {user_id}")
21 print(f"Connection status: {connection_request.status}")
22
23 return connection_request.id
24
25
26connection_id = authenticate_toolkit(user_id, airtable_auth_config_id)
27
28# You can verify the connection using:
29connected_account = composio.connected_accounts.get(connection_id)
30print(f"Connected account: {connected_account}")

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4airtable_auth_config_id = "ac_YOUR_AIRTABLE_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": {"generic_api_key": user_api_key}}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Airtable for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, airtable_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Airtable toolkit’s playground

For code examples, see the Tool calling guide and Provider examples.

Tool List

Tool Name: Create base

Description

Creates a new Airtable base with specified tables and fields within a workspace.

Action Parameters

name
stringRequired
tables
arrayRequired
workspaceId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Comment

Description

Tool to create a comment on a specific Airtable record. Use when adding comments to records, mentioning collaborators using @[userId] syntax, or creating threaded comment replies. Supports optional parentCommentId for threaded conversations.

Action Parameters

baseId
stringRequired
parentCommentId
string
recordId
stringRequired
tableIdOrName
stringRequired
text
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Field

Description

Creates a new field within a specified table in an Airtable base.

Action Parameters

baseId
stringRequired
description
string
name
stringRequired
options
tableId
stringRequired
type
stringDefaults to singleLineText

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create multiple records

Description

Creates multiple new records in a specified Airtable table.

Action Parameters

baseId
stringRequired
records
arrayRequired
tableIdOrName
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create a record

Description

Creates a new record in a specified Airtable table; field values must conform to the table's column types.

Action Parameters

baseId
stringRequired
fields
object
tableIdOrName
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create records

Description

Tool to create multiple records (up to 10) in a specified Airtable table. Use when you need to add new rows to a table with field values. Rate limit: 5 requests per second per base.

Action Parameters

baseId
stringRequired
records
arrayRequired
returnFieldsByFieldId
boolean
tableIdOrName
stringRequired
typecast
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create table

Description

Creates a new table within a specified existing Airtable base, allowing definition of its name, description, and field structure.

Action Parameters

baseId
stringRequired
description
string
fields
arrayRequired
name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Comment

Description

Tool to delete a comment from a record in an Airtable table. Use when you need to remove an existing comment. Non-admin users can only delete their own comments; Enterprise Admins can delete any comment.

Action Parameters

baseId
stringRequired
recordId
stringRequired
rowCommentId
stringRequired
tableIdOrName
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete multiple records

Description

Tool to delete up to 10 specified records from a table within an Airtable base. Use when you need to remove multiple records in a single operation.

Action Parameters

baseId
stringRequired
recordIds
arrayRequired
tableIdOrName
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Record

Description

Permanently deletes a specific record from an existing table within an existing Airtable base.

Action Parameters

baseId
stringRequired
recordId
stringRequired
tableIdOrName
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Base Schema

Description

Retrieves the detailed schema for a specified Airtable base, including its tables, fields, field types, and configurations, using the `baseId`.

Action Parameters

baseId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Record

Description

Retrieves a specific record from an Airtable table. Use when you need to fetch details of a single record by its ID. Empty field values are not returned in the response.

Action Parameters

baseId
stringRequired
cellFormat
stringDefaults to json
recordId
stringRequired
returnFieldsByFieldId
boolean
tableIdOrName
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get user information

Description

Retrieves information, such as ID and permission scopes, for the currently authenticated Airtable user from the `/meta/whoami` endpoint.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List bases

Description

Retrieves all Airtable bases accessible to the authenticated user, which may include an 'offset' for pagination.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Comments

Description

Tool to list comments on a specific Airtable record. Use when retrieving comments for a record, with optional pagination support for large comment threads.

Action Parameters

baseId
stringRequired
offset
string
pageSize
integer
recordId
stringRequired
tableIdOrName
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List records

Description

Tool to list records from an Airtable table with filtering, sorting, and pagination. Use when you need to retrieve multiple records from a table with optional query parameters.

Action Parameters

baseId
stringRequired
cellFormat
stringDefaults to json
fields
array
filterByFormula
string
maxRecords
integer
offset
string
pageSize
integerDefaults to 100
recordMetadata
array
returnFieldsByFieldId
boolean
sort
array
tableIdOrName
stringRequired
timeZone
string
userLocale
string
view
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Comment

Description

Tool to update an existing comment on a specific Airtable record. Use when modifying comment text or updating user mentions using @[userId] syntax. API users can only update comments they have created.

Action Parameters

baseId
stringRequired
recordId
stringRequired
rowCommentId
stringRequired
tableIdOrName
stringRequired
text
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Field

Description

Updates a field's name or description in an Airtable table. Use this action to modify field metadata without changing the field's type or options. At least one of 'name' or 'description' must be provided.

Action Parameters

baseId
stringRequired
columnId
stringRequired
description
string
name
string
tableId
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update multiple records

Description

Tool to update up to 10 records in an Airtable table with selective field modifications. Use when you need to modify multiple existing records or perform upsert operations. Updates are not performed atomically.

Action Parameters

baseId
stringRequired
performUpsert
object
records
arrayRequired
returnFieldsByFieldId
boolean
tableIdOrName
stringRequired
typecast
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update multiple records (PUT)

Description

Tool to destructively update multiple records in Airtable using PUT, clearing unspecified fields. Use when you need to fully replace record data or perform upsert operations. Supports up to 10 records per request.

Action Parameters

baseId
stringRequired
performUpsert
object
records
arrayRequired
returnFieldsByFieldId
boolean
tableIdOrName
stringRequired
typecast
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update record

Description

Modifies specified fields of an existing record in an Airtable base and table; the base, table, and record must exist.

Action Parameters

baseId
stringRequired
fields
objectRequired
recordId
stringRequired
returnFieldsByFieldId
boolean
tableIdOrName
stringRequired
typecast
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update record (PUT)

Description

Updates an existing record in an Airtable base using PUT method. Use when you want to replace all field values, clearing any unspecified fields. For partial updates that preserve unspecified fields, use the PATCH-based update action instead.

Action Parameters

baseId
stringRequired
fields
objectRequired
recordId
stringRequired
returnFieldsByFieldId
boolean
tableIdOrName
stringRequired
typecast
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Table

Description

Updates the name, description, and/or date dependency settings of a table in Airtable. Use this action to modify table metadata without changing the table's fields or views. At least one of 'name', 'description', or 'dateDependencySettings' must be provided.

Action Parameters

baseId
stringRequired
dateDependencySettings
object
description
string
name
string
tableIdOrName
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired