Google Drive Integration

Enable users to access and upload Google Drive files (docs, slides, sheets, etc.) directly through the chat interface.

Setup Steps

  1. Create a Google Cloud Project

  2. Enable Required APIs

    • In APIs & Services > Library, enable:
      • Google Drive API
      • Google Picker API
  3. 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.
  4. 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.
  5. 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.)
  6. Add Test Users

    • In the OAuth consent screen configuration, add all testersโ€™ emails if the app is in โ€œTestingโ€ mode.
  7. 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)
  8. 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, or http://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.