Overview
The Google Drive integration gives configured agents access to Drive files and shared drives. The same durable OAuth connection also authorizes native Google Sheets tools for spreadsheet metadata, bounded ranges, cell edits, and creation. There is no separate Google Sheets connection or token store. Choose one authorization mode:- Each member connects: tools use the acting member’s Google account and inherit that person’s Drive and spreadsheet permissions.
- Org service account: an administrator connects one intentionally shared Google account whose access is used by the organization’s configured agents.
- Read only (recommended): uses Google’s
drive.readonlygrant. Agents can search, list, inspect, read, export, and download Drive files and Google Docs, and can read Google Sheets metadata and bounded ranges. Server-side policy rejects create, upload, copy, move, edit, append, and clear operations. - Read and write: uses Google’s full
drivegrant and enables those mutation workflows for agents that are also configured with mutation tools.
Setup
1
Connect Google Drive
An organization admin opens Control Hub → Integrations → Google Drive,
selects the per-user or shared-account mode, chooses read-only or
read-and-write access, and completes Google OAuth.
2
Connect members when using per-user mode
Each member authorizes their own Google account. Agent calls then see only
files and spreadsheets that member can access.
3
Select agent tools
Add only the Drive and Sheets tools the agent needs. Read, edit, and create
are separate capabilities so mutation access can be withheld.
4
Validate safely
Use a dedicated non-sensitive test spreadsheet. Read metadata first, make a
narrow write, verify the returned range and cell count, and test clear only
against a disposable explicit range.
Native Google Sheets tools
All three tools require the Google Drive integration (
google_drive). They do
not add a Sheets OAuth card, alter Clerk login, delete spreadsheets, or delete
tabs.
In read-only mode, google_sheets_read is available while
google_sheets_edit and google_sheets_create fail before sending a mutation
to Google. Tool selection still provides a second layer of control: omit
mutation tools from agents that should never request them, even in an
organization with read-and-write Drive access.
Read behavior and limits
Omitranges from google_sheets_read to inspect only the spreadsheet and tab
metadata. With ranges, use bounded A1 notation such as 'Revenue 2026'!A1:F100.
Whole-row and whole-column ranges are rejected so a call cannot accidentally
load an arbitrarily large workbook.
- A request accepts at most 20 ranges covering at most 50,000 addressable cells.
- Output defaults to at most 10,000 non-empty cells and 100,000 text characters.
- Results report whether they were truncated and how many returned cells were omitted. Read smaller ranges to continue.
formattedreturns the display value and is the default.rawreturns the underlying unformatted value.formulareturns formula expressions where present. Date/time output can be serial numbers or formatted strings for raw/formula reads; Google ignores that choice for formatted reads.- Empty ranges return an empty values array with
empty: true.
google_drive_download_file exports XLSX. The Drive
text reader can export the first tab as CSV. These remain better fits for file
download workflows; Sheets-native reads are designed for selected tabs and
ranges.
Edit safety and concurrency
Everygoogle_sheets_edit call requires a spreadsheet ID and an operations
array. Every operation requires a bounded, tab-qualified range. The tool
validates operation shapes, tab names, grid bounds, row/column/cell counts, and
serialized payload size before the first mutation.
writestores a two-dimensional value matrix inside the exact range.appenduses the explicit range to locate a table and inserts supplied rows after it.clearremoves values only; formatting and data validation remain.- Input defaults to
raw, which stores strings literally. Selectuser_enteredonly when Sheets should interpret formulas, dates, or numbers as if a person typed them.
expected_modified_time from a
prior read. The edit is rejected before mutations if the Drive modification time
has already changed. This preflight comparison is not an atomic spreadsheet
lock; collaborators can still edit after the check.
OAuth scopes
Aster does not request a Sheets- or Docs-specific scope. Google’s Sheets scope table and officialvalues.get
and
values.update
method references document the Drive scopes used by this integration:
https://www.googleapis.com/auth/drive.readonlyauthorizes spreadsheet metadata and value reads, as well as Drive file reads.https://www.googleapis.com/auth/driveauthorizes spreadsheet creation and value writes, appends, and clears, plus Drive mutation workflows.
drive.readonly scope is introduced solely to offer a genuinely
read-only Drive connection. It does not change Clerk’s Google login scopes and
does not create another OAuth client, connection card, or token store.
Troubleshooting
Spreadsheet or tab not found
Spreadsheet or tab not found
Confirm the spreadsheet ID, exact tab name, and the connected account’s
access. Quote tab names that contain spaces, such as
'Sales Plan'!A1:C20.Invalid or unbounded A1 range
Invalid or unbounded A1 range
Use a start and end cell, for example
Sheet1!A1:D100. Whole columns such
as A:D and whole rows such as 1:100 are intentionally rejected.Permission denied
Permission denied
Share the spreadsheet with the connected Google account and ensure the
Google Sheets API is enabled on Aster’s OAuth project. Protected ranges can
also reject an otherwise valid edit.
Rate limited or result too large
Rate limited or result too large
Retry after a short delay and split the request into fewer or smaller ranges
or operation batches.