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 Willow'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/

Google Cloud Console - API Library

  1. Create a new project or select an existing one

  2. Go to APIs & ServicesLibrary and enable the APIs you need:

    • Google Drive API
    • Google Docs API
    • Google Sheets API
    • Google Slides API
  3. In the left sidebar, go to APIs & ServicesOAuth consent screen

  4. Configure your OAuth consent screen with the required information

OAuth consent screen configuration

  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)
  2. Go to APIs & ServicesCredentials

  3. Click Create CredentialsOAuth client ID

  4. Select Web application

  5. Under Authorized redirect URIs, add:

    • For SaaS deployments: https://{org}.mcp-s.com/{org}/api/auth/callback
    • For On-Premise deployments: {connectUrl}/{org}/api/auth/callback
  6. Click Create

  7. Copy the Client ID and Client Secret

  8. In Willow, paste the Client ID and Client Secret

  9. Select the same scopes you configured

  10. 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

  4. Enter a Service account name and click Create and Continue

  5. Click Done

  6. Click on the created service account

  7. Go to the Keys tab

  8. Click Add KeyCreate new keyJSON

  9. Save the downloaded JSON key file

  10. In Willow, upload or paste the service account JSON key

  11. 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
  12. Configure the scopes and subject (user to impersonate) in Willow

Note: If setting up a Service Account without first going through the OAuth flow above, make sure to enable the required Google Workspace APIs (Drive, Docs, Sheets, Slides) in APIs & ServicesLibrary.