Skip to main content

At a glance

  • Availability: Enabled by default.
  • Auth: OAuth 2.0.
  • Connection: A user authorizes the connection in the provider’s consent screen.
  • Scopes: https://www.googleapis.com/auth/drive.

Credentials

Set these per environment. See Connect an integration. With a managed OAuth app, Connect works without these variables; set them to use your own OAuth app instead.
VariableRequiredDescription
GOOGLE_CLIENT_IDYesGoogle OAuth Client ID Docs.
GOOGLE_CLIENT_SECRETYesGoogle OAuth Client Secret Docs.

Setup

  1. Create a Google Cloud Project: Go to the Google Cloud Console and create a new project
  2. Enable the Google Drive API: Navigate to APIs & Services > Library and enable the Google Drive API
  3. Configure OAuth Consent Screen: Go to APIs & Services > OAuth consent screen. Set up your app name, user support email, and developer contact. Add scope: drive (full access)
  4. Create OAuth 2.0 Client ID: Go to APIs & Services > Credentials. Click ‘Create Credentials’ > ‘OAuth client ID’. Choose ‘Web application’. Add authorized redirect URI: http://localhost:3000/api/auth/drive/callback (adjust port/domain for production)
  5. Copy Credentials to .env: Copy the Client ID and Client Secret to your .env file as GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET
  6. Test the Integration: Start your application and navigate to /api/auth/drive to initiate the OAuth flow
  • The same Google OAuth credentials work for all Google services (Gmail, Calendar, Sheets, Drive)
  • In production, make sure to add your production callback URL to authorized redirect URIs
  • The drive scope grants full access to all files; tools like update_file and delete_file require it for files not created by this app
  • You may need to verify your app if you plan to distribute it publicly

Tools

ToolAccessDescription
List FilesReadList files and folders in a Google Drive folder or root
Get FileReadGet metadata and details about a specific file or folder
Search FilesReadSearch for files and folders using queries
Create FolderWriteCreate a new folder in Google Drive
Upload FileWriteUpload or create a file in Google Drive
Update FileWriteRename a file, update its description, or move it to a different folder in Google Drive
Delete FileWritePermanently delete a file or folder from Google Drive
Download FileReadDownload the content of a binary or text file stored in Google Drive (not Google Docs/Sheets/Slides; use export_file for those)
Export FileReadExport a Google Docs/Sheets/Slides file to another format such as text/plain, text/csv, or application/pdf

Example prompts

  • Help me organize files in Google Drive by creating folders and moving files based on file types or names.
  • Search Google Drive for a specific file or document by name, type, or content.
  • Create a backup folder structure in Google Drive and organize important files.