Upsert Coda Rows
coda_upsert_rowsInsert new rows or update existing ones in a Coda base table by matching on specified key columns.
Instructions
Insert or update rows in a Coda table (base table only, not views).
Provide row data as an array of objects, each with column IDs as keys. Use coda_list_columns to get the column IDs first.
Args:
doc_id (string): The document ID
table_id (string): The BASE table ID (not a view)
rows (array): Array of row objects. Each object has a "cells" array with {column, value} pairs. Example: [{"cells": [{"column": "c-ABC123", "value": "Hello"}]}]
key_columns (array, optional): Column IDs to use as unique keys for upsert matching
Returns: Request ID and number of rows added/updated.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"doc_id": "<doc_id>",
"table_id": "<table_id>",
"rows": "<rows>"
},
"name": "coda_upsert_rows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Rows to insert/update | |
| doc_id | Yes | Coda document ID | |
| table_id | Yes | Base table ID (not a view) | |
| key_columns | No | Column IDs used as unique keys for upsert matching |