Airtable Component
Manage records, tables and bases in Airtable
Component key: airtable
Description
Airtable is a spreadsheet-database hybrid, with the features of a database but applied to a spreadsheet. This component allows you to list, create, delete, and update records in an Airtable Base.
API Documentation
This component was built using the Airtable Web API.
Airtable developer documentation can be found here.
Connections
[Legacy] Airtable API Key and Base ID
Airtable API keys will be deprecated on Feb 1, 2024. Please elect to use OAuth 2.0 or personal access tokens instead.
Input | Notes | Example |
---|---|---|
API Key string / Required apiKey | You can generate an API key from https://airtable.com/account. | keyvTlNCTqEXAMPLE |
Airtable Base ID string / Required base | Visit https://airtable.com/api and select your workspace. The ID of your base will be printed for you in green. | appGJJCPlhEXAMPLE |
Airtable OAuth 2.0
To create an OAuth 2.0 app in Airtable, first log in to Airtable and then visit airtable.com/create/oauth.
Register a new OAuth integration, and enter https://oauth2.prismatic.io/callback
as the OAuth redirect URL.
Under Scopes, select all scopes that you'll need. Note which scopes you selected, along with the Client ID and Client secret that Airtable provides you. Enter scopes, client ID and client secret into Prismatic's config wizard designer.
Input | Default | Notes |
---|---|---|
Authorize URL string / Required Hidden Field authorizeUrl | https://airtable.com/oauth2/v1/authorize | The OAuth 2.0 Authorization URL for Airtable |
Client ID string / Required clientId | Provide the Client ID you received from https://airtable.com/create/oauth. | |
Client Secret password / Required clientSecret | Provide the Client Secret you received from https://airtable.com/create/oauth. | |
Scopes string / Required scopes | data.records:read data.records:write data.recordComments:read data.recordComments:write schema.bases:read schema.bases:write webhook:manage | A space-delimited set of one or more scopes to get the user's permission to access. |
Token URL string / Required Hidden Field tokenUrl | https://airtable.com/oauth2/v1/token | The OAuth 2.0 Token URL for Airtable |
Personal Access Token
A personal access token can be used for testing an Airtable integration. You can create a personal access token at airtable.com/create/tokens.
Input | Notes | Example |
---|---|---|
API Key string / Required apiKey | You can generate an API key from https://airtable.com/create/tokens | pat0000.ffffffff |
Triggers
Webhook
Receive and validate webhook requests from Airtable for webhooks you configure. | key: webhook
Example Payload for Webhook
{
"payload": {
"headers": {
"Accept": "*/*",
"Content-Type": "application/json",
"Host": "hooks.prismatic.io",
"User-Agent": "Airtable (https://api.airtable.com)"
},
"queryParameters": null,
"rawBody": {
"data": "<data (547 bytes)>"
},
"body": {
"data": [
{
"id": "rec12345",
"fields": {
"Field 1": "Value 1",
"Field 2": "Value 2"
},
"createdTime": "2023-01-01T00:00:00.000Z"
}
],
"contentType": "application/json"
},
"pathFragment": "",
"webhookUrls": {
"Flow 1": "https://hooks.example.prismatic.io/trigger/EXAMPLESW5zdGFuY2VGbG93Q29uZmlnOjJjNjkwY2VjLWMwODctNDMxZC05MjVjLTEzODQ2OTkzNzAyMw=="
},
"webhookApiKeys": {
"Flow 1": [
"sample-api-key"
],
"create record": [
"sample-api-key"
],
"Airtable trigger": [
"sample-api-key"
]
},
"invokeUrl": "https://hooks.example.prismatic.io/trigger/EXAMPLESW5zdGFuY2VGbG93Q29uZmlnOjJjNjkwY2VjLWMwODctNDMxZC05MjVjLTEzODQ2OTkzNzAyMw==",
"executionId": "SW5zdGFuY2VFeGVjdXRpb25SZXN1bHQ6NTgwMzdhOTAtMWZkZi00NjFiLTgwOTUtNWY4Njg1YzUxMzY3",
"customer": {
"id": "testCustomerId",
"name": "Test Customer",
"externalId": "testCustomerExternalId"
},
"instance": {
"id": "testInstanceId",
"name": "Test Instance"
},
"user": {
"id": "testUserId",
"email": "testUserEmail@example.com",
"name": "Test User",
"externalId": "testUserExternalId"
}
}
}
Data Sources
Select Base
Select an Airtable base | key: selectBase | type: picklist
Input | Default | Notes |
---|---|---|
Connection connection / Required airtableConnection | ||
Include ID in dropdown menu? boolean includeId | false | When enabled, the base or table ID will be included next to the dropdown menu options. |
Select Table
Select a table from a base | key: selectTable | type: picklist
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required airtableConnection | |||
Base ID string / Required baseId | The ID of the base to interact with. Required if you use an OAuth connection, and optional if you specify base ID with a legacy API Key connection. | appLkNDICXNqxSDhG | |
Include ID in dropdown menu? boolean includeId | false | When enabled, the base or table ID will be included next to the dropdown menu options. |
Actions
Create Record
Create a new record in the given table | key: createRecord
Input | Notes | Example |
---|---|---|
Connection connection / Required airtableConnection | ||
Base ID string baseId | The ID of the base to interact with. Required if you use an OAuth connection, and optional if you specify base ID with a legacy API Key connection. | appLkNDICXNqxSDhG |
Record Fields string / Required Key Value List recordFields | A record is the base equivalent of a row in a spreadsheet. | |
Table Name string / Required tableName | Provide the name of the table you would like to access. | myExampleTable |
Example Payload for Create Record
{
"data": {
"id": "recZ6jmpj3EXAMPLE",
"createdTime": "2022-06-01T17:50:40.000Z",
"fields": {
"Notes": "We finished this and we're ready to move on to our backlog",
"Status": "Complete",
"Start date": "2022-05-31",
"Projects": "Updated sales process",
"Another": 0
}
}
}
Create Webhook
Create a new webhook for a base | key: createWebhook
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required airtableConnection | |||
Base ID string baseId | The ID of the base to interact with. Required if you use an OAuth connection, and optional if you specify base ID with a legacy API Key connection. | appLkNDICXNqxSDhG | |
Notification URL string notificationUrl | An optional URL that can receive notification pings. | ||
Specification code / Required specification | A JSON object that describe the types of changes the webhook is interested in. |
Delete Record
Delete a record inside of the given table | key: deleteRecord
Input | Notes | Example |
---|---|---|
Connection connection / Required airtableConnection | ||
Base ID string baseId | The ID of the base to interact with. Required if you use an OAuth connection, and optional if you specify base ID with a legacy API Key connection. | appLkNDICXNqxSDhG |
Record ID string / Required recordId | Within Airtable, each record has a unique identifier known as a Record ID. If you are familiar with Entity-Relationship Diagrams or ERDs, then the record id would be the primary key. | rec6r4kNmGDk5D52F |
Table Name string / Required tableName | Provide the name of the table you would like to access. | myExampleTable |
Example Payload for Delete Record
{
"data": {
"deleted": true,
"id": "rec560UJdUtocSouk"
}
}
Delete Webhook
Delete a webhook | key: deleteWebhook
Input | Notes | Example |
---|---|---|
Connection connection / Required airtableConnection | ||
Base ID string baseId | The ID of the base to interact with. Required if you use an OAuth connection, and optional if you specify base ID with a legacy API Key connection. | appLkNDICXNqxSDhG |
Webhook ID string / Required webhookId | The ID of the webhook to be deleted. |
Get Base Schema
Get all tables schema within a base | key: getBaseSchema
Input | Notes | Example |
---|---|---|
Connection connection / Required airtableConnection | ||
Base ID string baseId | The ID of the base to interact with. Required if you use an OAuth connection, and optional if you specify base ID with a legacy API Key connection. | appLkNDICXNqxSDhG |
Example Payload for Get Base Schema
{
"data": {
"tables": [
{
"description": "Apartments to track.",
"fields": [
{
"description": "Name of the apartment",
"id": "fld1VnoyuotSTyxW1",
"name": "Name",
"type": "singleLineText"
},
{
"id": "fldoaIqdn5szURHpw",
"name": "Pictures",
"type": "multipleAttachments"
},
{
"id": "fldumZe00w09RYTW6",
"name": "District",
"options": {
"inverseLinkFieldId": "fldWnCJlo2z6ttT8Y",
"isReversed": false,
"linkedTableId": "tblK6MZHez0ZvBChZ",
"prefersSingleRecordLink": true
},
"type": "multipleRecordLinks"
}
],
"id": "tbltp8DGLhqbUmjK1",
"name": "Apartments",
"primaryFieldId": "fld1VnoyuotSTyxW1",
"views": [
{
"id": "viwQpsuEDqHFqegkp",
"name": "Grid view",
"type": "grid"
}
]
},
{
"fields": [
{
"id": "fldEVzvQOoULO38yl",
"name": "Name",
"type": "singleLineText"
},
{
"description": "Apartments that belong to this district",
"id": "fldWnCJlo2z6ttT8Y",
"name": "Apartments",
"options": {
"inverseLinkFieldId": "fldumZe00w09RYTW6",
"isReversed": false,
"linkedTableId": "tbltp8DGLhqbUmjK1",
"prefersSingleRecordLink": false
},
"type": "multipleRecordLinks"
}
],
"id": "tblK6MZHez0ZvBChZ",
"name": "Districts",
"primaryFieldId": "fldEVzvQOoULO38yl",
"views": [
{
"id": "viwi3KXvrKug2mIBS",
"name": "Grid view",
"type": "grid"
}
]
}
]
}
}
Get Current User
Get user ID and OAuth scopes for the current user | key: getCurrentUser
Input | Notes |
---|---|
Connection connection / Required airtableConnection |
Get Record
Retrieve a record by ID from the given table | key: getRecord
Input | Notes | Example |
---|---|---|
Connection connection / Required airtableConnection | ||
Base ID string baseId | The ID of the base to interact with. Required if you use an OAuth connection, and optional if you specify base ID with a legacy API Key connection. | appLkNDICXNqxSDhG |
Record ID string / Required record | Within Airtable, each record has a unique identifier known as a Record ID. If you are familiar with Entity-Relationship Diagrams or ERDs, then the record id would be the primary key. | rec6r4kNmGDk5D52F |
Table Name string / Required tableName | Provide the name of the table you would like to access. | myExampleTable |
Example Payload for Get Record
{
"data": {
"id": "recZ6jmpj3EXAMPLE",
"createdTime": "2022-06-01T17:50:40.000Z",
"fields": {
"Notes": "We finished this and we're ready to move on to our backlog",
"Status": "Complete",
"Start date": "2022-05-31",
"Projects": "Updated sales process",
"Another": 0
}
}
}
List Bases
List all bases within the Airtable account | key: listBases
Input | Notes |
---|---|
Connection connection / Required airtableConnection |
Example Payload for List Bases
{
"data": [
{
"id": "appLkNDICXNqxSDhG",
"name": "Apartment Hunting",
"permissionLevel": "create"
},
{
"id": "appSW9R5uCNmRmfl6",
"name": "Project Tracker",
"permissionLevel": "edit"
}
]
}
List Records
List all records inside of the given table | key: listRecords
Input | Notes | Example |
---|---|---|
Connection connection / Required airtableConnection | ||
Base ID string baseId | The ID of the base to interact with. Required if you use an OAuth connection, and optional if you specify base ID with a legacy API Key connection. | appLkNDICXNqxSDhG |
Fields string Value List fields | Enter the names (or IDs) of the fields you would like returned. If you omit this list, all fields will be returned. | Notes |
Filter By Formula string filterByFormula | Filter results to only records that meet some particular criteria. | AND({Quantity} * {Price} > 100, NOT({Shipped?})) |
Table Name string / Required tableName | Provide the name of the table you would like to access. | myExampleTable |
View string view | The name or ID of a view in your table. If set, only records in that view will be returned, sorted in the way that the view is sorted. | Grid view |
Filtering Records
You can filter for specific records using the Filter By Formula input.
For example, if you want only records where the product of the Quantity
and Price
fields is greater than 100, and the record's Shipped?
field is not checked, you can use a formula like this:
AND({Quantity} * {Price} > 100, NOT({Shipped?}))
Full documentation on Airtable formula is available on their support site.
Example Payload for List Records
{
"data": [
{
"id": "recZ6jmpj3EXAMPLE",
"createdTime": "2022-06-01T17:50:40.000Z",
"fields": {
"Notes": "We finished this and we're ready to move on to our backlog",
"Status": "Complete",
"Start date": "2022-05-31",
"Projects": "Updated sales process",
"Another": 0
}
}
]
}
List Webhooks
List all webhooks registered for a base | key: listWebhooks
Input | Notes | Example |
---|---|---|
Connection connection / Required airtableConnection | ||
Base ID string baseId | The ID of the base to interact with. Required if you use an OAuth connection, and optional if you specify base ID with a legacy API Key connection. | appLkNDICXNqxSDhG |
Raw Request
Send raw HTTP request to Airtable | key: rawRequest
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Data string data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} | |
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
File Data string Key Value List fileData | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] | |
File Data File Names string Key Value List fileDataFileNames | File names to apply to the file data inputs. Keys must match the file data keys above. | ||
Form Data string Key Value List formData | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] | |
Header string Key Value List headers | A list of headers to send with the request. | User-Agent: curl/7.64.1 | |
Max Retry Count string maxRetries | 0 | The maximum number of retries to attempt. | |
Method string / Required method | The HTTP method to use. | ||
Query Parameter string Key Value List queryParams | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | ||
Response Type string / Required responseType | json | The type of data you expect in the response. You can request json, text, or binary data. | |
Retry On All Errors boolean retryAllErrors | false | If true, retries on all erroneous responses regardless of type. | |
Retry Delay (ms) string retryDelayMS | 0 | The delay in milliseconds between retries. | |
Timeout string timeout | The maximum time that a client will await a response to its request | 2000 | |
URL string / Required url | Input the path only (/v0/meta/bases/{BASE_ID}/tables), The base URL is already included (https://api.airtable.com). For example, to connect to https://api.airtable.com/v0/meta/bases/{BASE_ID}/tables, only /v0/meta/bases/{BASE_ID}/tables is entered in this field. | /v0/meta/bases/{BASE_ID}/tables | |
Use Exponential Backoff boolean useExponentialBackoff | false | Specifies whether to use a pre-defined exponential backoff strategy for retries. |
Refresh Webhook
Extend the life of a webhook | key: refreshWebhook
Input | Notes | Example |
---|---|---|
Connection connection / Required airtableConnection | ||
Base ID string baseId | The ID of the base to interact with. Required if you use an OAuth connection, and optional if you specify base ID with a legacy API Key connection. | appLkNDICXNqxSDhG |
Webhook ID string / Required webhookId | The ID of the webhook to be deleted. |
Update Record
Update a record's content inside a given table | key: updateRecord
Input | Notes | Example |
---|---|---|
Connection connection / Required airtableConnection | ||
Base ID string baseId | The ID of the base to interact with. Required if you use an OAuth connection, and optional if you specify base ID with a legacy API Key connection. | appLkNDICXNqxSDhG |
Record ID string / Required record | Within Airtable, each record has a unique identifier known as a Record ID. If you are familiar with Entity-Relationship Diagrams or ERDs, then the record id would be the primary key. | rec6r4kNmGDk5D52F |
Record Fields string / Required Key Value List recordFields | A record is the base equivalent of a row in a spreadsheet. | |
Table Name string / Required tableName | Provide the name of the table you would like to access. | myExampleTable |
Example Payload for Update Record
{
"data": {
"id": "recZ6jmpj3EXAMPLE",
"createdTime": "2022-06-01T17:50:40.000Z",
"fields": {
"Notes": "We finished this and we're ready to move on to our backlog",
"Status": "Complete",
"Start date": "2022-05-31",
"Projects": "Updated sales process",
"Another": 0
}
}
}