Google Sheets
Arcade.dev LLM tools for Google Sheets.
Google Sheets Toolkit
The Google Sheets toolkit connects Arcade to Google Sheets (and the underlying Drive API), enabling LLMs to read, write, inspect, comment on, and audit spreadsheets on behalf of authenticated users.
Capabilities
- Spreadsheet access & discovery: Search Drive for spreadsheets by title/content, batch-check access to multiple files before reading, generate a first-party Drive picker URL when access must be granted, and retrieve the authenticated user's profile and permissions.
- Read & inspect: Inspect workbook structure (tabs, used ranges, table regions, charts, merges, conditional formats, protected ranges) or read a specific cell range with optional per-cell annotations and markdown/CSV/TSV export; paginate large ranges via budget-aware windowing.
- Write & edit: Create new spreadsheets or batch-edit existing ones using the full Sheets
batchUpdaterequest vocabulary (updateCells,addSheet,sortRange,addConditionalFormatRule,autoResizeDimensions, and more); supports typed cell values including formulas. - Comments & threads: List comment threads (with reply previews), read full reply threads, create/edit/resolve/reopen file-level comments, add replies, and delete comments.
- Edit history: Retrieve Drive revision history in summary or paginated list mode — reporting contributors, timestamps, and recency — without exposing cell-level diffs.
- Data quality scanning: Deterministically flag malformed, inconsistent, or suspicious cells by rule and severity (no LLM inference), producing structured output ready to drive annotation or conditional formatting workflows; handles multi-tab scans with per-tab fault isolation.
OAuth
This toolkit uses OAuth 2.0 via Google. See the Arcade Google auth provider docs for setup details.
Secrets
ENABLE_GOOGLE_DRIVE_INLINE_PICKER_URL
This secret is a feature-flag value (not a credential) that controls whether the CheckSpreadsheetAccess tool returns an inline Google Drive picker URL directly in its response. When enabled, CheckSpreadsheetAccess can surface a single picker URL covering all ungranted spreadsheet IDs, letting users grant access without a separate tool call.
How to obtain / set: This is an Arcade-side configuration value, not issued by Google. Set it in your Arcade environment via the Arcade secrets dashboard or through the Arcade config system. Consult the Arcade tool secrets guide for the mechanics of registering and referencing secrets in your deployment.
Available tools(12)
| Tool name | Description | Secrets | |
|---|---|---|---|
Check whether this app can already read each of several spreadsheets, in one
batched pre-flight call, before attempting to read them.
Use this when the user references multiple spreadsheets so any that are not yet
accessible can be granted together in a single picker step, instead of hitting a
separate access error and grant prompt for each one. Each input may be a bare file id
or a full Google Sheets/Drive URL.
Returns ``spreadsheets`` (a per-id list with ``accessible``, the ``title`` and
``mime_type`` when the file was read, and a ``reason`` when not usable),
``all_accessible`` (true only when every id is an already-accessible spreadsheet),
``connected_account_email`` (the connected Google account, empty when unknown), and a
``grant`` block. ``grant`` is empty when nothing needs granting; otherwise it lists the
ungranted ids (``ungranted_ids``) plus, when the inline picker is enabled, a single
picker URL covering them all.
A ``reason`` of ``not_accessible_or_not_found`` is either a file not granted to this app
yet or one that does not exist (indistinguishable here) — the picker resolves the
former. ``not_a_spreadsheet`` is an accessible file of another type (a Doc, PDF, image,
or Excel/CSV file); granting cannot change a type, so for an Excel/CSV file ask the user
to open it in Google Sheets and use File, Save as Google Sheets, then share the
converted file. ``invalid_reference`` is an input that is not a Drive id or link at all;
ask the user to re-check it. | 1 | ||
Create a comment on a spreadsheet, edit a comment's body, or resolve/reopen it.
Comments are created at the file level: the Drive API cannot anchor a NEW Sheets comment to a
specific cell or range. Cell/range-anchored comments made in the Sheets UI are still readable
via list_spreadsheet_comments (which returns their anchor). Editing a comment's body is
allowed only for the comment's author. | 1 | ||
Create a new spreadsheet or batch-edit an existing one.
Omit `spreadsheet_id` to create; provide it to edit. All writes flow through
`requests[]` — typed operations like updateCells, addSheet, sortRange,
addConditionalFormatRule, autoResizeDimensions, and more.
For updateCells use ExtendedValue with an explicit type field (stringValue,
numberValue, boolValue, formulaValue).
By default, build clean, professional-looking tables with restrained, consistent
formatting and plain-text tab names/headers (no emojis); only use emojis or
decorative styling when the user explicitly asks for it. | 1 | ||
Delete a comment from a spreadsheet.
Only the comment's author can delete it (enforced by Google Drive); deleting marks the
whole thread (the comment and its replies) as deleted. | 1 | ||
Generate a URL where the user can grant this app access to spreadsheets.
Opens Google's first-party Drive picker, filtered to Google Sheets, where the user
browses and selects which spreadsheets to share with this application — it is not a
sign-in or credential prompt.
Use this when a prior tool reported that a file was not found or access was denied, and
the user expects the file to exist. After the user completes the picker flow, retry the
prior operation. | |||
Report who edited a spreadsheet and when, from Google Drive revisions.
Reports the "who" and "when" only — not which cells changed, and it can't revert.
'summary' (default) answers "who last edited this and when" (read from the file's head,
so always accurate), plus per-window aggregates (revisions read, contributors, first
edit) and a preview of recent edits — computed over a bounded window of history per call.
These aggregates describe the whole history only when `is_incomplete` is false; it is
true when the scan was resumed from a token and/or more history remains. To answer
"when was this first edited?" or "who contributed?" reliably, call from the beginning
(no `pagination_token`) and check `is_incomplete` is false. `pagination_token` is
returned when more pages remain so you can resume.
'list' returns one page of individual revisions, oldest first. Drive can't sort
newest-first, so the most recent individual revisions are on the final page. | 1 | ||
Inspect a Google Sheets spreadsheet's structure or read a range of cells.
Use the default 'structure' mode to understand a workbook cheaply before reading.
Switch to 'read' mode to pull a range as a grid of rows, optionally with
per-cell annotations and a rendered markdown/csv/tsv export.
In 'read' mode the response's per-tab 'sheets' block reports only tab identity and
the allocated grid; its scan-derived fields (used_range, populated_cell_count,
formula_cell_count, first_row, table_regions) are placeholders (0/empty) because read
mode does not scan the tab — they do NOT mean the tab is empty or that it has no
tables. The data you read is in the top-level 'range' and 'rows'. Call 'structure'
mode for those aggregates and for the workbook's charts, merges, protected ranges, and
conditional formats.
Workflow for a tab that holds multiple tables, or a table that does not start at A1:
call 'structure' first and use that tab's estimated 'table_regions' to choose the
a1_range to read or filter, so you target one table instead of a glued multi-table
range.
Always check the response's top-level 'warnings' list: read mode reports there when a
result was capped or trimmed (cell budget, the per-cell annotation cap, or an empty
filter scan) and tells you how to recover (page 'next_range', narrow 'a1_range',
'select_columns', or request fewer annotation kinds). | 1 | ||
List a spreadsheet's comment threads, or the full replies of a single comment.
In 'comments' mode each comment includes up to a few trimmed reply previews plus the total reply_count; use 'thread' mode for a comment's complete reply list. Without filters/ordering, pagination walks every comment. Client-side filters (has_replies, resolved) and order_by are applied only within a bounded scan of the first 500 comments, so on larger sheets drop them and page through everything with the native (unbounded) pagination. Each comment's Drive anchor is returned when it was cell/range-anchored in the Sheets UI; comments created via the API are file-level. Filtering, ordering, and offset pagination are best-effort: results can drift if comments are added or removed between paginated calls. | 1 | ||
Add a reply to an existing comment on a spreadsheet.
To resolve or reopen the comment instead, use comment_on_spreadsheet with a status. | 1 | ||
Deterministically flag 'weird'/bad cells in spreadsheet data.
No LLM judgement: the same input always returns the same flags. Each cell-level finding
carries a coord, a 0-based row_index/column_index (ready for a Sheets GridRange), the rule,
a severity (high -> red, medium/low -> yellow), and a note-ready reason — so the output
drops straight into an annotate/format recipe. In the default `mode='grouped'` these are
aggregated per rule+column within each table into `groups` (with A1 `coords`); use
`mode='list'` to get every flagged cell in `flags` with its 0-based indices.
Provide `spreadsheet_id` to scan a live sheet (scan one tab via sheet_id/sheet_title, or
every tab when both are omitted). Set `orientation='rows'` for transposed tables whose
fields run down a column instead of across a row. Findings come back as flags (cell-level,
high certainty) and alerts (table-level, lower certainty), grouped sheet -> table -> rule.
In all-sheets mode an unreadable tab never aborts the scan: its title is collected in
`failed_sheets` (and echoed as a `warnings` entry) while every other tab still returns.
`failed_sheets` is empty for a single-tab scan and whenever every tab reads cleanly. | 1 | ||
Searches for spreadsheets in the user's Google Drive based on the titles and content and
returns the title, ID, and URL for each matching spreadsheet.
Does not return the content/data of the sheets in the spreadsheets - only the metadata.
Excludes spreadsheets that are in the trash. | 1 | ||
Get comprehensive user profile and Google Sheets environment information.
This tool provides detailed information about the authenticated user including
their name, email, profile picture, Google Sheets access permissions, and other
important profile details from Google services. |