Integrations / Coda
Coda
Docs and tables: list docs, tables and rows, read a row and insert or update rows.
6 actions
API key
5 read1 write
Calls coda.io
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "coda" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
This toolkit uses a single credential and requests no scopes.
Actions
Get docreadcoda.get_docGet a Coda doc's metadata: name, owner, browser link and timestamps.
| Input | Type | Description | |
|---|---|---|---|
doc_id | string | Required | Doc id (the part after _d in the doc URL) |
await setu.execute({
userId: "user_1",
action: "coda.get_doc",
input: {
"doc_id": "<doc_id>"
},
});Get rowreadcoda.get_rowGet one row of a Coda table by row id with its cell values.
| Input | Type | Description | |
|---|---|---|---|
doc_id | string | Required | Doc id (the part after _d in the doc URL) |
table | string | Required | Table id or name; the id is more reliable |
row | string | Required | Row id, e.g. i-tuVwxYz |
useColumnNames | boolean | Optional | Return column names instead of ids |
await setu.execute({
userId: "user_1",
action: "coda.get_row",
input: {
"doc_id": "<doc_id>",
"table": "<table>",
"row": "<row>"
},
});List docsreadcoda.list_docsList the Coda docs the token can access: id, name, owner and link. Use query to search by name.
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Maximum results |
pageToken | string | Optional | Token from the previous page's nextPageToken |
query | string | Optional | Search term |
await setu.execute({
userId: "user_1",
action: "coda.list_docs",
input: {},
});List rowsreadcoda.list_rowsList rows of a Coda table with column names as keys, optionally filtered by column:value.
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Maximum results |
pageToken | string | Optional | Token from the previous page's nextPageToken |
doc_id | string | Required | Doc id (the part after _d in the doc URL) |
table | string | Required | Table id or name; the id is more reliable |
query | string | Optional | Filter as <column name or id>:<value>, value JSON-encoded e.g. Status:"Done" |
useColumnNames | boolean | Optional | Return column names instead of ids |
await setu.execute({
userId: "user_1",
action: "coda.list_rows",
input: {
"doc_id": "<doc_id>",
"table": "<table>"
},
});List tablesreadcoda.list_tablesList the tables and views in a Coda doc: id, name and type. Table ids are needed for row actions.
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Maximum results |
pageToken | string | Optional | Token from the previous page's nextPageToken |
doc_id | string | Required | Doc id (the part after _d in the doc URL) |
await setu.execute({
userId: "user_1",
action: "coda.list_tables",
input: {
"doc_id": "<doc_id>"
},
});Insert or update rowswritecoda.upsert_rowsInsert rows into a Coda table, or update existing rows that match key_columns. Each row is a list of column/value cells. Applied asynchronously.
| Input | Type | Description | |
|---|---|---|---|
doc_id | string | Required | Doc id (the part after _d in the doc URL) |
table | string | Required | Table id or name; the id is more reliable |
rows | array of object | Required | Rows to write |
key_columns | array of string | Optional | Column ids that identify an existing row to update instead of inserting |
await setu.execute({
userId: "user_1",
action: "coda.upsert_rows",
input: {
"doc_id": "<doc_id>",
"table": "<table>",
"rows": []
},
});