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
| Property | Value |
|---|---|
| Type | oauth2 |
| Credential sent as | Authorization: Bearer <credential> |
| Default scopes | openid, email, https://www.googleapis.com/auth/spreadsheets.readonly |
| Token endpoint auth | client_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.
| Scope | Description | Default |
|---|---|---|
openid | Identity (OpenID) | yes |
email | Email address | yes |
https://www.googleapis.com/auth/userinfo.email | Email address (Google canonical scope) | |
https://www.googleapis.com/auth/spreadsheets.readonly | Read-only access | yes |
https://www.googleapis.com/auth/spreadsheets | Full spreadsheet access | |
https://www.googleapis.com/auth/drive.file | Per-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.