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.