Set up Google Docs in Metorial for Claude, ChatGPT and Cursor
Share Google Docs with your team in Claude, ChatGPT and Cursor through Metorial: OAuth sign-in, 8 tools (2 read-only).
To give your team Google Docs in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Google Docs integration in a Metorial portal, and each person signs in to Google Docs with their own account. Agents can create, read, edit, and format Google Docs documents. The integration has 8 tools, 2 read-only, 2 write and 4 destructive, plus 2 triggers.
What you'll learn
- How an admin shares Google Docs in a portal and how each person connects
- The 7 OAuth scopes Google Docs can request, and what each one allows
- How to keep the 2 read-only tools and reject the other 6
Before you start
- A portal with at least one access group
- An account with Google Docs for each person who connects
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in method
| Method | Type | What a person provides |
|---|---|---|
| Google OAuth | OAuth | Signs in to Google Docs |
Google OAuth
People sign in to Google Docs and approve the scopes you allow. The integration can request:
| Scope | Name | What it allows |
|---|---|---|
https://www.googleapis.com/auth/documents | Documents | See, edit, create, and delete all Google Docs documents |
https://www.googleapis.com/auth/documents.readonly | Documents Read-only | See all Google Docs documents |
https://www.googleapis.com/auth/drive.file | Drive File | See, edit, create, and delete only specific Drive files used with the app (Recommended) |
https://www.googleapis.com/auth/drive | Drive | See, edit, create, and delete all Google Drive files |
https://www.googleapis.com/auth/drive.readonly | Drive Read-only | See and download all Google Drive files |
https://www.googleapis.com/auth/userinfo.profile | User Profile | View your basic profile info |
https://www.googleapis.com/auth/userinfo.email | User Email | View your email address |
The read-only tools need only https://www.googleapis.com/auth/documents.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 Docs OAuth app
With your own OAuth app, people see your company's name on the Google Docs 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 Docs and copy the Redirect URI.
Register the app
In the Google Cloud console, enable the API behind Google Docs 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 Docs integration.
Admin: share Google Docs 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 Docs. For how members connect, choose Each person connects, so everyone signs in to Google Docs as themselves.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Google Docs.
Choose who gets it
Add the access groups that should see Google Docs. 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 Docs integration. Once it exists, check which groups have it:
Employee: connect Google Docs
In the portal
Open Google Docs in the catalog
Sign in to your portal and open Google Docs. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. A Google Docs 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.
Add it to your AI client
metorial install adds your Google Docs 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 get_document and list_documents, and lose the 2 write tools, such as create_document or create_document_markdown, and the 4 destructive tools, such as edit_document or merge_template.
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 8 tools, minus any you rejected. list_documents takes no input.
To see every input a tool takes, run metorial schema <integration-id> <tool-key>.
Tools
Read-only tools (2)
get_document: Retrieves a Google Docs document by its ID. NeedsdocumentId.list_documents: Lists Google Docs documents accessible to the user.
Write tools (2)
create_document: Creates a new empty Google Docs document with the specified title. Needstitle.create_document_markdown: Creates a native Google Docs document by converting Markdown through a Google Drive multipart upload.
Destructive tools (4)
edit_document: Performs one or more editing operations on a Google Docs document. NeedsdocumentIdandoperations.manage_named_ranges: Creates or deletes named ranges in a Google Docs document. NeedsdocumentIdandoperations.merge_template: Replaces placeholder text in a Google Docs document with dynamic values. NeedsdocumentIdandreplacements.update_document_markdown: Replaces the full body of an existing native Google Docs document by converting Markdown through a Google Drive multipart upload.
Triggers
Google Docs has 2 triggers, which fire on events in Google Docs:
inbound_webhookdocument_changed: Triggers when a Google Docs document is created, modified, or deleted.
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Google Docs 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 Docs on metorial.com: the integration overview