At a glance
- Availability: Enabled by default.
- Authentication: OAuth 2.0.
- Connection: A user authorizes the connection in the provider’s consent screen.
- Scopes:
https://www.googleapis.com/auth/documents,https://www.googleapis.com/auth/drive.readonly.
Credentials
Set these per environment. See Connect an integration. These variables are required only when you supply your own OAuth app. If a managed app is available, you can connect without setting them. Provider permissions and consent still apply.Setup
- Create or select a Google Cloud project: Open the Google Cloud Console and select the project that will own the OAuth client.
- Enable the Google Docs API: Enable the Docs API used to read, create, and edit documents.
- Enable the Google Drive API: Enable the Drive API used to list and search Google Docs files.
- Configure the OAuth consent screen: Authorize exactly https://www.googleapis.com/auth/documents and https://www.googleapis.com/auth/drive.readonly.
- Create a web OAuth client: Create an OAuth 2.0 Client ID for a web application and register http://localhost:3000/api/auth/docs-google/callback for local development plus the matching HTTPS callback for each deployed environment.
- Configure credentials: Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in the application environment. Keep the client secret out of source control.
- Connect Google Docs: Start the application and open /api/auth/docs-google to complete the OAuth flow.
Provider notes
- The same Google OAuth client can serve Gmail, Calendar, Drive, Docs, and Sheets when all required APIs, scopes, and callback URLs are configured.
- Production deployments must use the application’s durable OAuth token store and verified user identity resolver.
Tools
Verify the connection
Call a read tool such asdocs-google__list_documents with arguments for your account. Confirm that the result comes from the intended account or workspace before enabling write tools.