Skip to main content

Gmail

Gmail is a web-based email service developed by Google.

Authentication Types

Gmail supports 2 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

Setting up OAuth

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

  2. Create a new project or select an existing one

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

  4. Choose External or Internal (Internal is only for Google Workspace orgs)

  5. Fill in the required information:

    • App name
    • User support email
    • Developer contact email
  6. Click Save and Continue

  7. On the Scopes page, click Add or Remove Scopes

  8. Add the Gmail scopes you need (e.g., https://mail.google.com/)

  9. Click Save and Continue

  10. Add test users if using External user type (optional during development)

  11. Go to APIs & ServicesCredentials

  12. Click Create CredentialsOAuth client ID

  13. Select Web application as the application type

  14. Enter a name for your OAuth client

  15. Under Authorized redirect URIs, click Add URI

  16. Add the Redirect URL:

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

  18. Copy the Client ID and Client Secret

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

  20. Select the same scopes you configured

  21. Click Save Changes

Note: You may need to enable the Gmail API in APIs & ServicesLibrary if not already enabled.

On this page