Add or update rows by a key
Updates the rows whose key column matches and adds the rest, so a list from anywhere syncs without reading the table first.
$0.001 per row added or updated
From your agent’s balance. A call that fails costs nothing.
An example
Here are this week's jobs from the spreadsheet. Bring the workshop table up to date: change the ones we have, add the new ones.
Your agent callsrows_upsert$0.001 per row added or updated
The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.
{
"table": "Workshop jobs",
"key": "Order",
"rows": [
{
"Order": "W-2026-118",
"Status": "Ready"
},
{
"Order": "W-2026-121",
"Customer": "Ladd's Bakery",
"Bike": "Ladd cargo",
"Work": "Brake bleed, new pads",
"Due": "2026-11-20",
"Status": "Waiting for parts",
"Price": 140
}
]
}Use it when
Keeping a table in step with another list: an export, a supplier's sheet, yesterday's orders.
- For changing rows by their numbers, use
rows_update. - For rows that are all new, use
rows_add.
What it does
Sync rows from anywhere without reading the table first: each row whose key column matches a row in the table updates it (only the columns given change; a null value clears a cell), the rest are added. The key is a text, email, url, phone, select or number column whose values are unique (text matches in any case). Up to 500 rows, checked first: if one is wrong, nothing changes.
What comes back
updated and added: how many of each; added_rows: the new rows' numbers. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
tableRequired | string | The table's name (or its table_id). 1 to 80 characters. |
keyRequired | string | The column that identifies a row, e.g. "Email" or "SKU". 1 to 60 characters. |
rowsRequired | array of objects | 1 to 500 items. |
The call
Over MCP, call rows_upsert on https://api.conecto.chat/mcp/tables. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/rows_upsert \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"table":"Workshop jobs","key":"Order","rows":[{"Order":"W-2026-118","Status":"Ready"},{"Order":"W-2026-121","Customer":"Ladd'\''s Bakery","Bike":"Ladd cargo","Work":"Brake bleed, new pads","Due":"2026-11-20","Status":"Waiting for parts","Price":140}]}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
not_found404 | No table has that name or table_id, or the table has no column of that name. | Call tables_list for the tables and their columns. |
invalid_input400 | A value does not fit its column, or a required column is empty; the message names the row and the column. | Send values of the column's type: numbers, dates like 2026-10-22, one of a select's options. |
limit_reached409 | The table would hold more than 100,000 rows. | Delete rows, or start another table. |
duplicate_key409 | A key value comes twice in the rows, or more than one row in the table has it. | Send each key once; merge or delete the table's extra rows first. |
More Tables tools
All 12 tools- Create a table
tables_createCreates a table with typed columns: text, numbers with decimals or a currency, checkboxes, dates, choices, emails, links, phone numbers or files.$0.001 a call - List tables
tables_listEvery table with its columns and how many rows it has.Free* - Change columns
tables_change_columnsAdds, renames or removes columns; rows keep their values through a rename.$0.001 a call - Add rows
rows_addAdds up to 500 rows, each checked against its columns; if one is wrong, none is added.$0.001 per row added - Change rows
rows_updateChanges values in up to 500 rows by row number; only the columns given change, and null clears a cell.$0.001 per row changed - Find rows
rows_queryRows matching filters, all or any of them, sorted by up to 3 columns, a page at a time.Free* - Summarize rows
rows_summarizeCounts rows, and sums, averages, minimums and maximums of number columns, overall and per group, in one call.Free* - Delete rows
rows_deleteDeletes rows by their numbers, for good.Free
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md