Setu Recipes: reusable digital workers across every app.Browse templates

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

TypeScript
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.
InputTypeDescription
doc_idstringRequiredDoc id (the part after _d in the doc URL)
TypeScript
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.
InputTypeDescription
doc_idstringRequiredDoc id (the part after _d in the doc URL)
tablestringRequiredTable id or name; the id is more reliable
rowstringRequiredRow id, e.g. i-tuVwxYz
useColumnNamesbooleanOptionalReturn column names instead of ids
TypeScript
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.
InputTypeDescription
limitintegerOptionalMaximum results
pageTokenstringOptionalToken from the previous page's nextPageToken
querystringOptionalSearch term
TypeScript
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.
InputTypeDescription
limitintegerOptionalMaximum results
pageTokenstringOptionalToken from the previous page's nextPageToken
doc_idstringRequiredDoc id (the part after _d in the doc URL)
tablestringRequiredTable id or name; the id is more reliable
querystringOptionalFilter as <column name or id>:<value>, value JSON-encoded e.g. Status:"Done"
useColumnNamesbooleanOptionalReturn column names instead of ids
TypeScript
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.
InputTypeDescription
limitintegerOptionalMaximum results
pageTokenstringOptionalToken from the previous page's nextPageToken
doc_idstringRequiredDoc id (the part after _d in the doc URL)
TypeScript
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.
InputTypeDescription
doc_idstringRequiredDoc id (the part after _d in the doc URL)
tablestringRequiredTable id or name; the id is more reliable
rowsarray of objectRequiredRows to write
key_columnsarray of stringOptionalColumn ids that identify an existing row to update instead of inserting
TypeScript
await setu.execute({
  userId: "user_1",
  action: "coda.upsert_rows",
  input: {
    "doc_id": "<doc_id>",
    "table": "<table>",
    "rows": []
  },
});