Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.prisme.ai/llms.txt

Use this file to discover all available pages before exploring further.

Google Sheets The Google Sheets app provides read/write access to a user’s Google Sheets through the Sheets API v4. It can be used either as a Builder app (automations call Sheets instructions directly) or as a remote MCP server consumed by an AI agent. Each tenant configures its own Google OAuth Application; end-users sign in with their own Google account and tokens are stored per (user × tenant). The connector exposes ~45 operations grouped into 12 entity tools covering spreadsheets metadata, full values read/write (single, batch and data-filter variants), sheet management, dimensions, cells formatting, find/replace and sorting, named & protected ranges, conditional formats, charts, banding and developer metadata.

Read & Write Values

Get, update, append and clear cell values across single ranges, multiple ranges or via data filters

Structure & Formatting

Add/delete sheets, insert/delete/resize rows and columns, merge cells, set borders, conditional formats, banding and charts

Data Operations

Find/replace, sort ranges, set the basic filter, manage named & protected ranges and developer metadata

Prerequisites

  • A Google account with access to the spreadsheets you want to expose. For Google Workspace, the workspace admin may need to allow third-party OAuth apps.
  • A Google Cloud project with the Google Sheets API enabled at console.cloud.google.com/apis/library/sheets.googleapis.com. Enable the Drive API too if you plan to locate spreadsheets via the Google Drive connector.
  • A Google OAuth 2.0 Client of type Web application, created at console.cloud.google.com/apis/credentials. The Authorized redirect URIs must contain the value shown in the OAuth Callback URL field of the installed app instance (auto-populated on install — copy it back into the Google Cloud Console after installation).
  • An OAuth consent screen configured in the Google Cloud project. While the app is in Testing state, add the end-user’s email to Test users. The default scopes spreadsheets + drive.file go through Google’s verification process when the consent screen moves to Production.
  • Base URL (default: https://sheets.googleapis.com/v4)
The Google Sheets API cannot list or search spreadsheets. To find spreadsheets or obtain a spreadsheetId, use the Google Drive connector — filter mimeType = application/vnd.google-apps.spreadsheet — then call spreadsheets.get here.

Installation

  1. Go to Apps in your workspace
  2. Search for Google Sheets and install it
  3. Open the app instance configuration and fill in the required fields

Configuration

FieldDescription
Google Sheets API Base URLBase URL of the Sheets API (default https://sheets.googleapis.com/v4)
Google OAuth Access Token (fallback)Optional static OAuth access token used as a shared fallback for all users of this tenant. Stored as a workspace secret. Most deployments leave this empty and rely on per-user OAuth instead.
Google OAuth2 Client IDGoogle OAuth Application Client ID. Create an OAuth client of type Web application in the Google Cloud Console
Google OAuth2 Client SecretGoogle OAuth Client Secret, stored as a workspace secret
OAuth Callback URLAuto-populated on install — paste this value into the Authorized redirect URIs list of your Google OAuth client
OAuth Authorize URLDefault https://accounts.google.com/o/oauth2/v2/auth
OAuth Token URLDefault https://oauth2.googleapis.com/token
OAuth Revoke URLDefault https://oauth2.googleapis.com/revoke
OAuth ScopesSpace-separated Google API scopes. Default https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive.file
Access Token TTL (seconds)Default 3600 (Google access tokens expire in 1h; refresh is automatic)
MCP EndpointAuto-populated on install — URL of the MCP endpoint for this instance
MCP API KeyAuto-populated on install — signed key used in the mcp-api-key header. Do not modify
MCP Endpoint, MCP API Key and OAuth Callback URL are generated automatically by the onInstall flow. The OAuth credentials (Google OAuth2 Client ID, Google OAuth2 Client Secret) must be filled in manually after creating the OAuth client in the Google Cloud Console.

Authorize end-users

Once the app instance is configured, each end-user authorizes their own Google account through a browser-based consent screen:
1

Trigger the connect flow

From an MCP client (Agent Creator capability or any tool client), call any data tool. If no OAuth session exists for the current user × tenant, the MCP server returns a connector_auth_required payload with a connect_url. Alternatively, call the connect tool explicitly to receive the same payload.
2

Open the connect URL

Open the returned URL in a browser tab where the user is already authenticated to Prisme.ai. The platform redirects to the Google OAuth consent screen.
3

Grant access

The user reviews the requested scopes (default spreadsheets + drive.file) and clicks Allow. Google redirects back to the platform’s oauthCallback webhook.
4

Confirmation

The user sees a Connection complete page and can close the tab. The platform has stored an access token plus refresh token as user-scoped secrets — both are tenant-prefixed so they do not leak across app instances.
Each user’s OAuth tokens are scoped per (user × tenant). A user who has authorized in tenant A does not gain access in tenant B — they must run the connect flow again per app instance. Access tokens are refreshed automatically from the stored refresh token.

Available Instructions

Every instruction resolves credentials from the workspace configuration. Most operations target a single spreadsheetId. Value operations use A1 notation ranges (e.g. Sheet1!A1:C10); structural operations target a sheet by its numeric sheetId (gid). Use batchUpdate directly to compose multiple structural changes in one atomic call.

Spreadsheets

InstructionArguments
createSpreadsheetproperties, sheets, namedRanges
getSpreadsheetspreadsheetId*, ranges, includeGridData
getSpreadsheetByDataFilterspreadsheetId, dataFilters, includeGridData
batchUpdateSpreadsheetspreadsheetId, requests, includeSpreadsheetInResponse, responseRanges, responseIncludeGridData

Values

InstructionArguments
getValuesspreadsheetId, range, majorDimension, valueRenderOption, dateTimeRenderOption
updateValuesspreadsheetId, range, valueInputOption, values, majorDimension, includeValuesInResponse, responseValueRenderOption, responseDateTimeRenderOption
appendValuesspreadsheetId, range, valueInputOption, values, majorDimension, insertDataOption, includeValuesInResponse, responseValueRenderOption, responseDateTimeRenderOption
clearValuesspreadsheetId, range
batchGetValuesspreadsheetId, ranges, majorDimension, valueRenderOption, dateTimeRenderOption
batchUpdateValuesspreadsheetId, valueInputOption, data*, includeValuesInResponse, responseValueRenderOption, responseDateTimeRenderOption
batchClearValuesspreadsheetId, ranges
batchGetValuesByDataFilterspreadsheetId, dataFilters, majorDimension, valueRenderOption, dateTimeRenderOption
batchClearValuesByDataFilterspreadsheetId, dataFilters
batchUpdateValuesByDataFilterspreadsheetId, valueInputOption, data*, includeValuesInResponse, responseValueRenderOption, responseDateTimeRenderOption

Sheets (Tabs)

InstructionArguments
addSheetspreadsheetId, properties
deleteSheetspreadsheetId, sheetId
duplicateSheetspreadsheetId, sourceSheetId, insertSheetIndex, newSheetId, newSheetName
updateSheetPropertiesspreadsheetId, properties, fields*
copyToSheetspreadsheetId, sheetId, destinationSpreadsheetId*

Dimensions (Rows & Columns)

InstructionArguments
insertDimensionspreadsheetId, range, inheritFromBefore
deleteDimensionspreadsheetId, range
appendDimensionspreadsheetId, sheetId, dimension, length
updateDimensionPropertiesspreadsheetId, range, properties, fields
autoResizeDimensionsspreadsheetId, dimensions
moveDimensionspreadsheetId, source, destinationIndex*

Cells

InstructionArguments
repeatCellspreadsheetId, range, cell, fields
updateCellsspreadsheetId, rows, fields*, start, range
mergeCellsspreadsheetId, range, mergeType
unmergeCellsspreadsheetId, range
updateBordersspreadsheetId, range, top, bottom, left, right, innerHorizontal, innerVertical

Data

InstructionArguments
findReplacespreadsheetId, find, replacement*, matchCase, matchEntireCell, searchByRegex, includeFormulas, range, sheetId, allSheets
sortRangespreadsheetId, range, sortSpecs*
setBasicFilterspreadsheetId, filter
clearBasicFilterspreadsheetId, sheetId

Named Ranges

InstructionArguments
addNamedRangespreadsheetId, namedRange
deleteNamedRangespreadsheetId, namedRangeId

Protected Ranges

InstructionArguments
addProtectedRangespreadsheetId, protectedRange
deleteProtectedRangespreadsheetId, protectedRangeId

Conditional Formats

InstructionArguments
addConditionalFormatRulespreadsheetId, rule, index
deleteConditionalFormatRulespreadsheetId, index, sheetId

Charts

InstructionArguments
addChartspreadsheetId, chart

Banding

InstructionArguments
addBandingspreadsheetId, bandedRange
deleteBandingspreadsheetId, bandedRangeId

Developer Metadata

InstructionArguments
getDeveloperMetadataspreadsheetId, metadataId
searchDeveloperMetadataspreadsheetId, dataFilters
Arguments flagged with * are required.

DSUL Examples

Create a spreadsheet with two tabs

- Google Sheets.spreadsheets:
    action: create
    properties:
      title: '{{report.name}} — {{run.date}}'
    sheets:
      - properties:
          title: Summary
      - properties:
          title: Raw data
    output: created

Append a row to the end of a table

- Google Sheets.values:
    action: append
    spreadsheetId: '{{sheetId}}'
    range: 'Sales!A1:E1'
    valueInputOption: USER_ENTERED
    insertDataOption: INSERT_ROWS
    values:
      - - '{{order.date}}'
        - '{{order.customer}}'
        - '{{order.product}}'
        - '{{order.quantity}}'
        - '=D{{nextRow}}*15'

Read two ranges in one call

- Google Sheets.values:
    action: batchGet
    spreadsheetId: '{{sheetId}}'
    ranges:
      - 'Summary!A1:B5'
      - 'Raw data!A2:F'
    majorDimension: ROWS
    valueRenderOption: UNFORMATTED_VALUE
    output: batch

Find & replace placeholders across an entire spreadsheet

- Google Sheets.data:
    action: findReplace
    spreadsheetId: '{{sheetId}}'
    find: '{{{{customer_name}}}}'
    replacement: '{{customer.name}}'
    matchCase: false
    allSheets: true

Apply an atomic batchUpdate (freeze header + auto-resize columns)

- Google Sheets.spreadsheets:
    action: batchUpdate
    spreadsheetId: '{{sheetId}}'
    requests:
      - updateSheetProperties:
          properties:
            sheetId: 0
            gridProperties:
              frozenRowCount: 1
          fields: 'gridProperties.frozenRowCount'
      - autoResizeDimensions:
          dimensions:
            sheetId: 0
            dimension: COLUMNS
            startIndex: 0
            endIndex: 5

Error Handling

HTTP StatusMeaningTypical Cause
400Bad RequestMalformed range, missing valueInputOption, invalid Request object inside a batchUpdate
401UnauthorizedMissing / expired OAuth token, revoked refresh token, user has not connected yet
403ForbiddenSheets API disabled in the Google Cloud project, scope insufficient, user lost access to the spreadsheet
404Not FoundSpreadsheet / sheet / named range does not exist or the user has no access
409ConflictOptimistic concurrency failure in a batchUpdate with requiredRevisionId
429Rate LimitedPer-user or per-project quota exhausted. Back off and retry
500 / 503Server ErrorTransient Google Sheets API error. Retry with exponential backoff

Common Issues

“Not configured” — The app instance has no OAuth Client ID/Secret. Create an OAuth client in the Google Cloud Console and paste the credentials into the app configuration. “Invalid API key” (MCP) — The mcp-api-key header does not match the central app secret. Reinstall the app instance to regenerate a signed key. “Credentials lookup failed” — The MCP endpoint could not reach the getConfig webhook of the installed app. Verify that the app instance is still installed in the expected workspace. connector_auth_required — The calling user has no Google OAuth session yet for this tenant. The response payload includes a connect_url; relay it to the user so they can authorize their Google account. redirect_uri_mismatch during the OAuth dance — The value of OAuth Callback URL in the app config has not been added to the Authorized redirect URIs of the Google OAuth client. Copy it back into the Google Cloud Console and retry. Unable to parse range — The range argument is not valid A1 notation. The sheet name must be quoted with single quotes if it contains spaces (e.g. 'Q2 results'!A1:C10). Missing valueInputOption (400) — Write operations (update, append, batchUpdate*) require valueInputOption: RAW or USER_ENTERED. The latter interprets formulas, dates and numbers like the Sheets UI. “No spreadsheetId” / cannot list spreadsheets — The Google Sheets API does not expose a list/search endpoint. Pair this connector with the Google Drive connector to enumerate spreadsheets (mimeType = application/vnd.google-apps.spreadsheet), then call spreadsheets.get. The user does not have sufficient permissions for file … (403) — The default scope drive.file only grants access to files the user created with the app or opened with the app. To work with arbitrary user spreadsheets, broaden the scope to https://www.googleapis.com/auth/spreadsheets.readonly + drive.readonly (read-only) or spreadsheets + drive (full Drive). Broader scopes require Google verification before going to production.

External Resources

Google Sheets API v4

Official Google Sheets REST API reference

Tool Agents

Build AI agents that call MCP tools dynamically