Built-in tool
Write spreadsheet record
Add or update a record in a spreadsheet.
Endpoint
Parameters
| Name | Type | Required | Note |
|---|---|---|---|
| spreadsheetIdstring · required | string | required | UUID of the target spreadsheet. Obtain from the spreadsheet URL or a previous list call. |
| rowMappingobject · required | object | required | Object mapping Field IDs to their values, e.g. {"col-uuid-1": "Alice", "col-uuid-2": 42}. |
| modestring · optional | string | optional | Write mode: "append" always creates a new Record; "upsert" updates an existing Record if found (match is based on rowIndexTemplate). One of: Default: |
| rowIndexTemplatestring · optional | string | optional | Template expression used to identify the Record for upsert mode (e.g. a Field value). Required when mode is "upsert". Example: |
Response schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"spreadsheetId",
"mode",
"rowsWritten",
"rowIds",
"writtenAt"
],
"properties": {
"mode": {
"type": "string"
},
"rowIds": {
"type": "array",
"items": {
"type": "string"
}
},
"writtenAt": {
"type": "string"
},
"rowsWritten": {
"type": "number"
},
"spreadsheetId": {
"type": "string"
}
},
"additionalProperties": false
}