IntegrationsIntegration setup guides

Google Sheets

Connect Google Sheets to your Appstrate agents.

Overview

Google Sheets is Google's online spreadsheet. The integration lets agents read and write spreadsheet data through the Sheets API.

Integration: @appstrate/google-sheets (version 1.0.5), reached through the api_call tool. For how this works, see How integrations work.

Authentication

PropertyValue
Typeoauth2
Credential sent asAuthorization: Bearer <credential>
Default scopesopenid, email, https://www.googleapis.com/auth/spreadsheets.readonly
Token endpoint authclient_secret_post

Scopes

The scopes below are the catalogue the integration declares. An agent gets the default scopes plus any it lists under scopes in its integrations_configuration.

ScopeDescriptionDefault
openidIdentity (OpenID)yes
emailEmail addressyes
https://www.googleapis.com/auth/userinfo.emailEmail address (Google canonical scope)
https://www.googleapis.com/auth/spreadsheets.readonlyRead-only accessyes
https://www.googleapis.com/auth/spreadsheetsFull spreadsheet access
https://www.googleapis.com/auth/drive.filePer-file access (recommended)

Authorized URIs

The sidecar sends the credential only to URLs that match one of these patterns:

  • https://sheets.googleapis.com/**

Connect Google Sheets

An administrator registers an OAuth client once, then members connect their own accounts.

Create or select a Google Cloud project (open).

Enable the API you need in that project.

Configure the OAuth consent screen (open).

Create an OAuth client ID of type "Web application" and register the Appstrate redirect URI (open).

Register the redirect URI in the OAuth client's authorized redirect URIs: it is APP_URL followed by /api/integrations/callback, also shown in the integration's setup panel.

In Appstrate, open the integration and register the OAuth client (client ID and client secret). See How integrations work.

Use it in an agent

Excerpt of the agent manifest:

{
  "dependencies": {
    "integrations": { "@appstrate/google-sheets": "^1.0.0" }
  },
  "integrations_configuration": {
    "@appstrate/google-sheets": {
      "tools": ["api_call"],
      "scopes": ["https://www.googleapis.com/auth/spreadsheets"]
    }
  }
}

api_call has no per-tool scopes, so scopes beyond the defaults are listed explicitly (here https://www.googleapis.com/auth/spreadsheets).

Example prompt:

Read the "Monitoring" sheet, list the competitor URLs in column A, and add today's findings in column C.

On this page