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.
Fixing Google OAuth 2.0 โRegister the JavaScript originโ Error
When you see this error:
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.
If you're the app developer, register the JavaScript origin in the Google Cloud Console. Request details: origin=https://chat.inquirer.arthur.ai flowName=GeneralOAuthFlow
It means your appโs origin is not registered in Google Cloud for OAuth.
How to Fix
1. Open Google Cloud Console
Go to: https://console.cloud.google.com/apis/credentials
2. Find Your OAuth 2.0 Client ID
- Under the โCredentialsโ tab, locate your OAuth 2.0 Client IDs.
- Click on the client used by your application (often called โWeb clientโ or similar).
3. Add the JavaScript Origin
- In the client details, look for the field called โAuthorized JavaScript originsโ.
- Click โAdd URIโ.
- Enter:
https://chat.inquirer.arthur.ai
(No trailing slash, exactly as used in your appโs URL)
4. Save Your Changes
- Click Save at the bottom of the page.
5. Test the Login Flow
- Wait a minute for changes to propagate.
- Retry your sign-in with Google.
Tips
- If you use multiple environments (staging, dev, etc.), add each environmentโs base URL.
- Origin format is only:
protocol://domain[:port]
(e.g.https://chat.inquirer.arthur.ai
, orhttp://localhost:3000
) - Do NOT add any path (like
/oauth2callback
)โthose go in redirect URIs instead.
Troubleshooting
- Double-check for typosโ
http
vs.https
matters! - No trailing slash.
- Changes may take a minute to propagate.
- If issues persist, ensure you are editing the correct OAuth 2.0 client (check which one your app is using).
Need help?
Drop a screenshot or your current config and we can walk you through it.
Updated 4 days ago