Skip to main content

Google Workspace

Google Workspace is a suite of productivity tools developed by Google, including Drive, Docs, Sheets, Slides, and more.

Authentication Types

Google Workspace supports 3 authentication methods:

  • OAuth - Create your own Google Cloud OAuth app. Every user connects with their Google account.

    • Pros: Full control, per-user tracking, production-ready
    • Cons: Requires Google Cloud Console setup
  • Instant OAuth - Use Webrix's pre-configured Google app for the fastest setup.

    • Pros: Fastest setup, no configuration needed
    • Cons: Limited scopes, not recommended for production
  • Server App - Use a Google Cloud service account for server-to-server authentication.

    • Pros: No user interaction needed, good for automated workflows
    • Cons: More complex setup, requires domain-wide delegation for accessing user data

Setting up OAuth

  1. Go to https://console.cloud.google.com/
  1. Create a new project or select an existing one

  2. In the left sidebar, go to APIs & ServicesOAuth consent screen

  3. Configure your OAuth consent screen with the required information

  1. On the Scopes page, add the scopes you need:
    • https://www.googleapis.com/auth/drive (Drive)
    • https://www.googleapis.com/auth/documents (Docs)
    • https://www.googleapis.com/auth/spreadsheets (Sheets)
    • https://www.googleapis.com/auth/presentations (Slides)
  1. Go to APIs & ServicesCredentials

  2. Click Create CredentialsOAuth client ID

  3. Select Web application

  4. Under Authorized redirect URIs, add the Redirect URL from Webrix

  1. Click Create

  2. Copy the Client ID and Client Secret

  1. In Webrix, paste the Client ID and Client Secret

  2. Select the same scopes you configured

  3. Click Save Changes

Setting up a Server App (Service Account)

  1. Go to https://console.cloud.google.com/

  2. Go to APIs & ServicesCredentials

  3. Click Create CredentialsService account

  1. Enter a Service account name and click Create and Continue
  1. Click Done

  2. Click on the created service account

  3. Go to the Keys tab

  4. Click Add KeyCreate new keyJSON

  1. Save the downloaded JSON key file

  2. In Webrix, upload or paste the service account JSON key

  3. Enable Domain-wide delegation for the service account:

    • In the service account details, check Enable Google Workspace Domain-wide Delegation
    • Go to Google Workspace Admin Console
    • Navigate to SecurityAPI controlsDomain-wide delegation
    • Add the service account Client ID with the required scopes
  1. Configure the scopes and subject (user to impersonate) in Webrix

Note: Enable the required Google Workspace APIs (Drive, Docs, Sheets, Slides) in APIs & ServicesLibrary.