Overview
Connect to Google Workspace by authorizing Mistle with a Google OAuth client or service account that you create in Google Cloud. Mistle uses the configured connection to obtain Google access tokens, then injects those tokens into the Workspace tools selected in a sandbox profile. Gmail, Drive, Sheets, Docs, Slides, Calendar, Chat, and People use Mistle’s localgws tool wrapper around the official Google REST APIs.
Enable Google Workspace APIs
Use a Google Cloud project owned by the Workspace organization that should authorize the selected Workspace tools. Enable the Workspace product APIs needed by the selected tools:PROJECT_ID with the Google Cloud project ID.
Configure Google Chat
If you enable the Google Chat tools, configure a Chat app in the same Google Cloud project:- Open Google Chat API > Manage > Configuration.
- Set App name to
Chat MCP. - Set Avatar URL to
https://developers.google.com/chat/images/quickstart-app-avatar.png. - Set Description to
Chat MCP server. - Turn off Enable interactive features.
- Select Log errors to Logging.
- Save the configuration.
Configure OAuth Consent
In Google Auth Platform, configure branding, audience, and data access for the OAuth app. For an internal Workspace rollout, select Internal audience when available. For an external app in testing mode, add every authorizing Google account as a test user before connecting. Add the OAuth scopes for the Workspace tools you intend to use. Mistle currently requests a fixed scope set for the supported Workspace tools:https://www.googleapis.com/auth/gmail.readonlyhttps://www.googleapis.com/auth/gmail.composehttps://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/spreadsheetshttps://www.googleapis.com/auth/documentshttps://www.googleapis.com/auth/presentationshttps://www.googleapis.com/auth/calendar.calendarlist.readonlyhttps://www.googleapis.com/auth/calendar.events.freebusyhttps://www.googleapis.com/auth/calendar.events.readonlyhttps://www.googleapis.com/auth/calendar.eventshttps://www.googleapis.com/auth/chat.spaces.readonlyhttps://www.googleapis.com/auth/chat.memberships.readonlyhttps://www.googleapis.com/auth/chat.messages.readonlyhttps://www.googleapis.com/auth/chat.messages.createhttps://www.googleapis.com/auth/chat.users.readstate.readonlyhttps://www.googleapis.com/auth/directory.readonlyhttps://www.googleapis.com/auth/userinfo.profilehttps://www.googleapis.com/auth/contacts.readonly
Create A Google OAuth Client
Create a Web application OAuth client in Google Auth Platform.- In Mistle, open Integrations and choose Google Workspace.
- Copy the callback URL shown by Mistle.
- In Google Cloud, open Google Auth Platform > Clients.
- Create an OAuth client with Application type set to Web application.
- Add the Mistle callback URL to Authorized redirect URIs.
- Create the client and copy its Client ID and Client secret.
- Return to Mistle, enter the client ID and client secret, and click Connect Google Workspace.
- Complete the Google consent flow with the Google account that should back the connection.
Connect With A Service Account
For headless Workspace automation, you can connect with a Google Cloud service account. This lets Mistle mint short-lived Google access tokens without an interactive OAuth consent flow.Domain-wide delegation is optional. Leave the sandbox profile’s Workspace user email blank to mint
tokens as the service account itself. Enter a Workspace user email only when the service account
is configured for domain-wide delegation and should impersonate that user.
- Create a Google Cloud service account in the same project used for the Workspace APIs.
- If you need domain-wide delegation, enable it in the service account details and copy the service account Client ID.
- If you enabled domain-wide delegation, open Google Workspace Admin Console > Security > Access and data control > API controls > Manage Domain Wide Delegation.
- If you enabled domain-wide delegation, click Add new, paste the service account Client ID, and authorize the full fixed Mistle OAuth scope set listed in Configure OAuth Consent.
- In Google Cloud, create a JSON key for the service account and store it carefully.
- In Mistle, choose Service account when adding a Google Workspace connection.
- Paste the service account JSON key.
Connect MCP Servers To A Sandbox Profile
After the Google Workspace connection is active:- Open the sandbox profile that should use Google Workspace.
- Add the Google Workspace integration connection to the profile.
- In Resources & Tools, select the Google Workspace tools that agents may use.
- For service account connections, optionally enter the Workspace user email Mistle should use as the Google Workspace user subject when minting access tokens with domain-wide delegation.
- Publish the profile version.