Integrations / Airtable
Airtable
Spreadsheet-database: bases, tables and records.
5 actions
OAuth 2
3 read2 write
Calls api.airtable.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "airtable" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
| Scope | Why it is requested |
|---|---|
data.records:read | Read records |
data.records:write | Create and update records |
schema.bases:read | See your bases and tables |
Actions
Create recordwriteairtable.create_recordCreate a record from a field map.
Needs scope: data.records:write
| Input | Type | Description | |
|---|---|---|---|
base_id | string | Required | Base ID, e.g. appXXXX |
table | string | Required | Table ID or name |
fields | object | Required |
await setu.execute({
userId: "user_1",
action: "airtable.create_record",
input: {
"base_id": "<base_id>",
"table": "<table>",
"fields": {}
},
});List basesreadairtable.list_basesList the bases the user granted access to.
Needs scope: schema.bases:read
No input.
await setu.execute({
userId: "user_1",
action: "airtable.list_bases",
input: {},
});List recordsreadairtable.list_recordsList records in a table, optionally filtered by a formula.
Needs scope: data.records:read
| Input | Type | Description | |
|---|---|---|---|
base_id | string | Required | Base ID, e.g. appXXXX |
table | string | Required | Table ID or name |
max_records | integer | Optional | |
filter_by_formula | string | Optional |
await setu.execute({
userId: "user_1",
action: "airtable.list_records",
input: {
"base_id": "<base_id>",
"table": "<table>"
},
});Search recordsreadairtable.search_recordsFind records whose formula evaluates true, e.g. {Name}='Ada'.
Needs scope: data.records:read
| Input | Type | Description | |
|---|---|---|---|
base_id | string | Required | Base ID, e.g. appXXXX |
table | string | Required | Table ID or name |
formula | string | Required | Airtable formula |
max_records | integer | Optional |
await setu.execute({
userId: "user_1",
action: "airtable.search_records",
input: {
"base_id": "<base_id>",
"table": "<table>",
"formula": "<formula>"
},
});Update recordwriteairtable.update_recordUpdate fields of a record (fields not provided are left unchanged).
Needs scope: data.records:write
| Input | Type | Description | |
|---|---|---|---|
base_id | string | Required | Base ID, e.g. appXXXX |
table | string | Required | Table ID or name |
record_id | string | Required | |
fields | object | Required |
await setu.execute({
userId: "user_1",
action: "airtable.update_record",
input: {
"base_id": "<base_id>",
"table": "<table>",
"record_id": "<record_id>",
"fields": {}
},
});