Authentication and enablement
Requires a workspace Google Sheets OAuth integration.access_token is injected (x-variable-service: google_sheets) and is never chosen by the model. Enable the tool on the agent and bind the integration.
Inputs
spreadsheet_id(required): the spreadsheet ID from the URL.strategy(required):insert(append) orupsert(update on key match, else append).columns(required): header names, letters (A,B), or 1-based numbers. Row values map in this order.rows(required): array of rows; each row’s length must equalcolumns.sheet_name(optional): defaults to the first sheet.key_column(upsert only): must also appear incolumns.
Output
Counts of rows inserted/updated plus the target spreadsheet and sheet.rows_updated counts sheet rows written, so two input rows carrying the same
key count once.
Limits and side effects
- Writes to the customer’s Google Sheet.
- Upsert matching is on
key_column. If two sheet rows carry the same key the whole upsert fails rather than guessing; if two input rows carry the same key, the last one wins. - Matching ignores case and surrounding spaces, and the matched key cell is left
as the sheet already spells it — an upsert keyed
Appleagainst a sheet holding" apple "updates that row’s other columns without rewriting the key.
Expected errors
- Missing/invalid Sheets integration token.
- Empty
columnsorrows, or a row whose length does not matchcolumns. key_columnmissing on upsert.- Spreadsheet or sheet not found.
- Google accepted the write but confirmed no cells were written.