Documentation
Google Drive
Connect Google Drive and use its tools through the Authlane control plane.
Prerequisites
Create a Google OAuth client for a project with Drive access. The connected account must have access to the files, folders, and shared drives that the SaaS will use. Use the Drive API guide, OAuth consent guide, and Google Cloud credentials console.
Self-hosted setup
- Create or select a Google Cloud project and enable Drive API. For MCP-first execution, also join the Workspace Developer Preview and enable Drive MCP API.
- Configure the OAuth consent screen, audience, test users, and the scopes below.
- Create a Web application OAuth client and register
https://<your-authlane-host>/api/v1/oauth/google-drive/callbackas an authorized redirect URI. - Copy the Client ID and Client Secret.
Configure authentication
Open Dashboard → Services → Google Drive → OAuth Configuration, enter the Client ID and Client Secret, save, and enable Google Drive. The callback must match the public Authlane URL exactly.
Scopes
Read-only tools requests only drive.readonly and drive.metadata.readonly. Full tool set
adds the write-capable scopes documented below and exposes create/update/delete tools.
https://www.googleapis.com/auth/drive.filepermits access to files the app creates or opens.https://www.googleapis.com/auth/drive.readonlypermits reading files visible to the connected account.
The exported adapter includes broader update, delete, and permission tools. Only expose them when the tenant has approved a configured scope that grants the corresponding Drive operation.
Execution path
Prefer Google's official Drive MCP server at https://drivemcp.googleapis.com/mcp/v1; follow the
official Drive MCP guide.
It is a Developer Preview, so retain the direct Drive API adapter as the explicit fallback when a
required tool is missing or the preview cannot be enabled.
Available tools
Find and read files
gdrive_list_filesgdrive_search_filesgdrive_get_filegdrive_download_filegdrive_export_file
Create and change content
gdrive_upload_filegdrive_create_foldergdrive_update_filegdrive_copy_filegdrive_trash_filegdrive_delete_file
Permissions
gdrive_list_permissionsgdrive_share_filegdrive_remove_permission
Install @authlane/integration-google-drive in the SaaS runtime. Tool callbacks obtain a fresh
lease and call Drive directly from that runtime; file content and provider responses do not pass
through Authlane.
Connection lifecycle
Google consent creates an encrypted connected connection. When the token response includes
expiry and refresh material, Authlane schedules refresh before expiry. Reconnect a connection that
cannot refresh and becomes expired or error. Disconnect through a new hosted session after
recent user reauthentication.
Troubleshooting
- Use file and permission IDs returned by Drive tools, not display names.
- A Workspace document must be exported with
gdrive_export_file; it is not downloaded like a binary file. - Permission changes and permanent delete can require access beyond the two default scopes; verify the tenant's approved custom scopes before exposing those tools.