Google Drive Integration
Enable users to access and upload Google Drive files (docs, slides, sheets, etc.) directly through the chat interface.
Setup Steps
-
Create a Google Cloud Project
- Go to the Google Cloud Console and create or select your project.
-
Enable Required APIs
- In APIs & Services > Library, enable:
- Google Drive API
- Google Picker API
- In APIs & Services > Library, enable:
-
Create OAuth 2.0 Credentials
- Go to APIs & Services > Credentials.
- Create an OAuth client ID (choose Web Application).
- Set Authorized JavaScript origins and redirect URIs to your Open-WebUI URL.
-
Generate an API Key
- In the same section, create an API Key.
- Restrict usage to your Open-WebUI URL and only to the Drive and Picker APIs.
-
Set OAuth Scopes
- In your application, request this scope at minimum:
https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.readonly https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
- (Optionally add
https://www.googleapis.com/auth/userinfo.email
for user info.)
- In your application, request this scope at minimum:
-
Add Test Users
- In the OAuth consent screen configuration, add all testersβ emails if the app is in βTestingβ mode.
-
Configure Environment Variables
- Set the following in your deployment:
GOOGLE_DRIVE_CLIENT_ID
(from OAuth credentials)GOOGLE_DRIVE_API_KEY
(from API key)GOOGLE_REDIRECT_URI
(your Open-WebUI URL)
- Set the following in your deployment:
-
Enable Integration in Open-WebUI
- Go to Admin Panel > Settings > Documents > Google Drive and enable the feature.
Troubleshooting
- Ensure the correct scopes are set and that the redirect URI matches your Open-WebUI address.
- Test user emails must be listed if in testing mode.
- Double-check API restrictions and permissions in the Cloud Console.
Updated 4 days ago