Integrations · Google Docs
Guild agents create Google Docs, read document content, and apply batch updates using OAuth credentials you control. Guild injects credentials server-side so agent code never sees them, and credential policies let you restrict which operations each agent can perform. Every request is logged for audit.
Book a demo
See how teams govern agents that use Google Docs.
Start free
Connect Google Docs and scope your first agent.
What the Google Docs integration exposes
The integration packageguildlabs~google-docs-oauth provides tools that create a blank document, retrieve its latest content, and apply one or more structural or textual updates in a single batch call. Tools use the google_docs_oauth_ prefix and require a document ID from the document URL. The OAuth scope grants read and edit access to every document the connected Google account can reach.
How it works
1
Connect the credential
Go to Access & setup > Credentials, click Connect, and select google-docs-oauth. See Credentials for workspace, member, and agent-scoped options.
2
Authorize with Google
Sign in with your Google account and approve access. Guild stores the token and refreshes it automatically.
3
Import tools into your agent
Import GoogleDocsOauthTools from the package and spread it into your agent’s tools object. The agent needs each document’s ID, taken from the URL segment between /document/d/ and the next /.
Why Google Docs access needs governing
The OAuth scope grants read and edit access to every document the connected Google account can reach. Guild’s credential policies let you write ALLOW and DENY rules that the credential proxy enforces before any request leaves Guild. You can restrict an agent to read-only access by allowing only google_docs_oauth_documents_get, block write operations with a DENY rule, or scope rules to specific agents or workspaces so one agent cannot use a credential intended for another. Credentials are stored and injected server-side. Agent code, prompts, and containers never see the token. Guild checks policies inside the proxy before adding authentication, so an agent that is denied an operation cannot reach the service at all. You can scope a credential to one workspace, one member, or a single agent using Credentials, and tighten or widen rules at any time without redeploying the agent.About the Google Docs integration
The Google Docs integration lets agents create Google Docs, read a document’s content, and edit it. The integration isguildlabs~google-docs-oauth.
The older
guildai~google-docs package is retired, and agents that import googleDocsTools from it get errors. Use guildlabs~google-docs-oauth instead.Authentication
- Type: OAuth 2.0
- Scope:
https://www.googleapis.com/auth/documents, which allows reading and editing every document the Google account can access - Token management: Refreshed automatically
Setup
1
Connect Google Docs
In Guild, go to Access & setup > Credentials, click Connect, and select google-docs-oauth.
2
Authorize
Sign in with your Google account and approve access.
Usage
google_docs_oauth_ prefix. The agent needs a document’s ID, the part of its URL between /document/d/ and the next /.
Tools
Tools in the latest published version ofguildlabs~google-docs-oauth:
Limitations
- The integration can’t list or search documents. To find documents by name, add the Google Drive integration.
google_docs_oauth_documents_createcreates a blank document with a title and ignores any content you pass. Add content withgoogle_docs_oauth_documents_batch_update.google_docs_oauth_documents_batch_updateapplies all of its requests or none: Google rejects the whole batch if any request is invalid.
Frequently asked questions
Can the agent search for documents by name?
Can the agent search for documents by name?
No. The integration has no tool to list or search documents. To find documents by name, add the Google Drive integration alongside this one.
What happens if one update in a batch is invalid?
What happens if one update in a batch is invalid?
Google rejects the whole batch. google_docs_oauth_documents_batch_update applies all of its requests or none, so a single invalid request blocks every other update in the same call.
Can I limit which operations an agent can perform on my Google Docs credential?
Can I limit which operations an agent can perform on my Google Docs credential?
Yes. Credential policies let you write ALLOW and DENY rules scoped to specific agents or workspaces. Guild’s proxy enforces the rules before any request reaches Google.
Does creating a document also add content to it?
Does creating a document also add content to it?
Not yet. google_docs_oauth_documents_create creates a blank document with a title and ignores any content passed in the request. Use google_docs_oauth_documents_batch_update in a follow-up call to add content.
Put a governed agent on Google Docs today
Book a demo
See how teams govern agents that use Google Docs.
Start free
Connect Google Docs and scope your first agent.