Set up Google Sheets in Metorial for Claude, ChatGPT and Cursor
Share Google Sheets with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or service account sign-in, 17 tools (2 read-only).
To give your team Google Sheets in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Google Sheets integration in a Metorial portal, and each person signs in to Google Sheets with their own account. Agents can create, read, and update spreadsheets and their cell data. The integration has 17 tools, 2 read-only, 13 write and 2 destructive, plus 1 trigger.
What you'll learn
- How an admin shares Google Sheets in a portal and how each person connects
- The 7 OAuth scopes Google Sheets can request, and what each one allows
- How to keep the 2 read-only tools and reject the other 15
Before you start
- A portal with at least one access group
- An account with Google Sheets for each person who connects
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in methods
| Method | Type | What a person provides |
|---|---|---|
| Service Account | Service account | serviceAccountJson |
| API Key | API token | token |
| OAuth (default) | OAuth | Signs in to Google Sheets |
The portal and metorial setup use OAuth unless someone picks another method.
Service Account
To connect, a person enters:
serviceAccountJson: Service account JSON key file contents
API Key
To connect, a person enters:
token: Google API Key for read-only access to public spreadsheets
OAuth
People sign in to Google Sheets and approve the scopes you allow. The integration can request:
| Scope | Name | What it allows |
|---|---|---|
https://www.googleapis.com/auth/spreadsheets | Spreadsheets (Full) | Full read/write access to all spreadsheets |
https://www.googleapis.com/auth/spreadsheets.readonly | Spreadsheets (Read) | Read-only access to all spreadsheets |
https://www.googleapis.com/auth/drive | Drive (Full) | Full access to Google Drive, needed for creating/deleting spreadsheets and push notifications |
https://www.googleapis.com/auth/drive.readonly | Drive (Read) | Read-only access to Google Drive files |
https://www.googleapis.com/auth/drive.file | Drive (App Files) | Access only to files created or opened by the app |
https://www.googleapis.com/auth/userinfo.profile | User Profile | View basic profile information |
https://www.googleapis.com/auth/userinfo.email | User Email | View email address |
The read-only tools need only https://www.googleapis.com/auth/spreadsheets.readonly. Allow just that scope in the Scopes picker when you create your own auth credentials, and the connection cannot change anything.
Use your own Google Sheets OAuth app
With your own OAuth app, people see your company's name on the Google Sheets consent screen, and the client ID and secret belong to you.
Start the credentials in Metorial
In the dashboard, select Settings, then Organization Settings. Under Integrations and MCP, select Provider Auth, then Create Auth Credentials. Choose Google Sheets and copy the Redirect URI.
Register the app
In the Google Cloud console, enable the API behind Google Sheets under APIs & Services, Library. Then go to Google Auth platform, Clients, click Create Client, choose Web application, and paste the redirect URI from Metorial under Authorized redirect URIs. Google shows the client secret only when you create the client.
The Google Workspace guide covers the consent screen and the OAuth client in Google Cloud step by step.
Finish in Metorial
Copy the app's client ID and client secret. Back in Metorial, enter a Name, the Client ID and the Client Secret, review Scopes, and select Create. Then pick these credentials for the Google Sheets integration.
Admin: share Google Sheets in a portal
In the dashboard
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
Share a new integration
Select Share a Resource, then New Integration, and choose Google Sheets. Under Auth Method, keep OAuth or pick another. For how members connect, choose Each person connects, so everyone signs in to Google Sheets as themselves.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Google Sheets.
Choose who gets it
Add the access groups that should see Google Sheets. When a person asks for access from the portal, the request appears under Access Requests.
With the CLI
The CLI cannot create the per-user Google Sheets integration. Once it exists, check which groups have it:
Employee: connect Google Sheets
In the portal
Open Google Sheets in the catalog
Sign in to your portal and open Google Sheets. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. A Google Sheets sign-in tab opens. Sign in and approve the permissions listed.
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
catalog search prints the catalog item ID. metorial setup uses OAuth. To connect with Service Account instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.
Add it to your AI client
metorial install adds your Google Sheets connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.
For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.
Make it read-only
Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 2 read-only tools, such as read_cells and get_spreadsheet, and lose the 13 write tools, such as merge_cells or write_cells, and the 2 destructive tools, such as clear_cells or delete_spreadsheet.
Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.
Check it worked
metorial tools lists the 17 tools, minus any you rejected. read_cells needs spreadsheetId, so replace the placeholders.
To see every input a tool takes, run metorial schema <integration-id> <tool-key>.
Tools
Read-only tools (2)
get_spreadsheet: Retrieves metadata and properties of a Google Sheets spreadsheet, including its title, locale, list of sheets/tabs, and named ranges. NeedsspreadsheetId.read_cells: Reads values from one or more ranges in a spreadsheet. NeedsspreadsheetId.
Write tools (13)
format_cells: Applies formatting to cells in a spreadsheet range. NeedsspreadsheetId,sheetId,startRowIndex,endRowIndex,startColumnIndexandendColumnIndex.create_pivot_table: Creates a pivot table that summarizes data from a source range. NeedsspreadsheetId,sourceSheetId,sourceStartRowIndex,sourceEndRowIndex,sourceStartColumnIndex,sourceEndColumnIndex,targetSheetId,targetRowIndex,targetColumnIndexandvalues.manage_protected_ranges: Add or remove protection on cell ranges to prevent modifications. NeedsspreadsheetIdandaction.batch_update: Executes multiple spreadsheet update operations atomically in a single request. NeedsspreadsheetIdandrequests.create_spreadsheet: Creates a new Google Sheets spreadsheet with optional initial sheet tabs. Needstitle.create_filter_view: Creates a filter view that provides a filtered perspective of data without affecting what other users see. NeedsspreadsheetId,titleandsheetId.update_spreadsheet: Updates the properties of a Google Sheets spreadsheet, such as its title, locale, or time zone. NeedsspreadsheetId.create_chart: Creates an embedded chart in a spreadsheet. NeedsspreadsheetId,chartType,sourceRangeandanchorSheetId.manage_named_ranges: Add, update, or delete named ranges in a spreadsheet. NeedsspreadsheetIdandaction.manage_sheets: Add, delete, duplicate, update, or copy individual sheet tabs. NeedsspreadsheetIdandaction.merge_cells: Merge or unmerge a range of cells in a spreadsheet. NeedsspreadsheetId,action,sheetId,startRowIndex,endRowIndex,startColumnIndexandendColumnIndex.set_data_validation: Sets data validation rules on a range of cells. NeedsspreadsheetId,sheetId,startRowIndex,endRowIndex,startColumnIndex,endColumnIndexandconditionType.write_cells: Writes values to one or more ranges in a spreadsheet. NeedsspreadsheetId.
Destructive tools (2)
delete_spreadsheet: Permanently deletes a spreadsheet from Google Drive. NeedsspreadsheetId.clear_cells: Clears all values from a specified range in a spreadsheet while preserving formatting. NeedsspreadsheetIdandrange.
Triggers
Google Sheets has 1 trigger, which fire on events in Google Sheets:
spreadsheet_changed: Triggers when a watched spreadsheet file is modified.
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Google Sheets there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- Google Workspace guide: the consent screen and the OAuth client in Google Cloud
- Google Sheets on metorial.com: the integration overview