Google Drive Connector
Use this page when you need the Google-side setup details for the Google Drive connector. For shared connector behavior, start with Connectors Overview and Provider Auth And Setup.
Runtime Shape
Section titled “Runtime Shape”- Implemented modes:
liveby default, optionalindexed - Auth binding: Better Auth generic OAuth provider id
google - Callback URI examples:
http://localhost:3001/api/auth/oauth2/callback/googlehttps://auth.example.com/api/auth/oauth2/callback/google
- Setup console URL:
- Required connector scopes:
https://www.googleapis.com/auth/drive.readonly
- Upload access mode additionally requires:
https://www.googleapis.com/auth/drive.file
Provider-Specific Gotchas
Section titled “Provider-Specific Gotchas”- Google Drive uses live file document search by default. Live access includes provider-backed file/folder listing for picker/focus flows and
file-resource-live-queryfor provider full-text/keyword document search plus bounded transient reads. - Indexed mode is optional and recommended for faster, broader semantic document answers over larger or historical Drive corpora. If enabled, eligible extracted chunks and vectors are retained for retrieval. Keeping Drive live-only avoids embedding sync and indexed artifact retention.
- Live and indexed Drive coverage must include My Drive, direct files/folders shared with the user, and accessible Shared Drives. Live search and indexed sync use Drive all-drives/shared-drive support, including
sharedWithMewhere appropriate, and live answers report user-safe coverage hints when the provider indicates an incomplete search. - Read-only Drive authorization is enough for indexed sync, file browsing, Library add, and focus. It is the default Access Level shown by the shared connect/settings form. It is not an upload destination. Library uploads require the upload access scope so the selected Google account can create the uploaded original in Drive. The Library upload picker lists upload-capable Drive connectors as destinations and can show read-only Drive connectors as access-upgrade candidates.
- Changing a Drive connector from upload access back to read-only stops that connector from being offered as a Library upload destination. It does not silently remove a write scope already granted to the linked Google account; provider-side grant removal requires revoking/relinking the Google account authorization.
- Uploaded originals live in the selected Google Drive account/folder. The platform stores upload metadata, pending state, and extracted text/chunks/vectors after indexing; it does not keep the original file as durable platform object storage.
- Google Drive live-only connections do not enqueue embedding sync. Manual sync is available when indexed mode is enabled.
- Local support verification for Drive file search should use connector prompt packs plus agent-browser chat smoke so source-backed answers, shared access, source panels, and user-facing terminology are checked together.
- Google Drive and Gmail share the same connector auth binding. Reauthorization under an existing linked
googleaccount requests the full scope set needed by sibling Google connectors under that account, so adding Gmail after Drive does not make Drive sync depend on which connector was authorized last. - The shared Google connector auth path requests account selection and offline access semantics. If sync loses refresh-token coverage, reconnect the linked account instead of patching tokens manually.
- The same signed-in user may link more than one Google account. Connector dashboard rows should always reopen the shared configure flow so the user can choose the intended linked account instead of silently reusing the last browser session.
Canonical Sources
Section titled “Canonical Sources”docs/features/library/spec.mdpackages/domain/src/connectors/connectorRegistry.tsapps/auth/src/genericOAuthProviders.tsapps/api/src/connectors/oauthTokenClient.tsdocs/features/connectors/spec.md