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.Setup
- Create a Google Cloud Project: Go to the Google Cloud Console and create a new project
- Enable the Google Drive API: Navigate to APIs & Services > Library and enable the Google Drive API
- 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)
- 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)
- Copy Credentials to .env: Copy the Client ID and Client Secret to your .env file as GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET
- 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
| Tool | Access | Description |
|---|---|---|
| List Files | Read | List files and folders in a Google Drive folder or root |
| Get File | Read | Get metadata and details about a specific file or folder |
| Search Files | Read | Search for files and folders using queries |
| Create Folder | Write | Create a new folder in Google Drive |
| Upload File | Write | Upload or create a file in Google Drive |
| Update File | Write | Rename a file, update its description, or move it to a different folder in Google Drive |
| Delete File | Write | Permanently delete a file or folder from Google Drive |
| Download File | Read | Download the content of a binary or text file stored in Google Drive (not Google Docs/Sheets/Slides; use export_file for those) |
| Export File | Read | Export 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.