MountainGoat · Email Sync
For Google Workspace administrators connecting a purchase-order mailbox to a MountainGoat instance.
This guide walks you through authorizing MountainGoat to read purchase-order email from one Gmail mailbox you choose. At a glance:
gmail.readonly. MountainGoat cannot send, delete, or change any message, and it never sees a password.MountainGoat finds purchase orders in a designated mailbox and turns them into structured, reviewable orders. To do that it needs read-only access to one Gmail mailbox, granted through Google's standard OAuth 2.0 consent flow.
Three steps share the work:
https://{app.subdomain}.mountaingoat.ai. Throughout this guide, {app.subdomain} is a placeholder for your subdomain label. Replace it everywhere it appears with your own label (for example acme, producing acme.mountaingoat.ai).Time required: about 15 minutes.
https://console.cloud.google.com and sign in with your Workspace admin account.MountainGoat Integration and create it.MountainGoat, add your support and developer email addresses, and Save.Why Internal matters. The Internal user type keeps the app private to your organization and avoids Google's external-app verification review. Only accounts in your Workspace can ever grant it access.
MountainGoat.{app.subdomain} with your subdomain label.https://{app.subdomain}.mountaingoat.ai/api/oauth/gmail/callback
The redirect URI must match character for character. A trailing slash or http:// instead of https:// will make the connection fail. Copy and paste it.
Sign in to your MountainGoat instance as an administrator, then:
| MountainGoat field | What to enter |
|---|---|
| Client ID | The Client ID from the OAuth client you created in section 5. |
| Client Secret | The Client secret from the same OAuth client. Stored encrypted and never displayed back. See the note below. |
| Redirect URI | https://{app.subdomain}.mountaingoat.ai/api/oauth/gmail/callback. Must match the authorized redirect URI in Google exactly. |
| Scopes | https://www.googleapis.com/auth/gmail.readonly. This is the default; leave it as is. |
About the Client Secret. The secret is write-only in the Admin UI: you can enter or replace it, but MountainGoat never displays it back and stores it encrypted. On a later edit, leave the Client Secret blank to keep the existing secret. Only type in the field when you intend to replace it.
On a managed instance, MountainGoat can enter the credentials for you. Send them through a password manager share, a one-time secret link, or read them over a phone call. Never put a client secret in the body of a normal email or chat message. If one ends up in an email thread, tell us and we will help you rotate it in minutes.
Click Save Gmail Config when you are done.
The person who owns the purchase-order mailbox completes the one-time connection:
MountainGoat stores an encrypted refresh token and begins read-only sync of that mailbox. Access is limited to the mailbox of the account that signs in here.
| Symptom | Cause | Fix |
|---|---|---|
Google shows redirect_uri_mismatch |
The redirect URI in Google does not exactly match the one MountainGoat sends. | Compare both values character for character, including https:// and no trailing slash, in Google and in the MountainGoat Redirect URI field. |
| Google shows an access-blocked or verification error | The consent screen user type is External. | Set the OAuth consent screen user type to Internal (section 4). |
| Consent screen never appears after clicking Connect Gmail | Client ID or Client Secret is missing or wrong in MountainGoat. | Re-check the Client ID and re-enter the Client Secret under Email Credentials, then save and retry. |
| Sync stops working later | The grant was revoked, or the mailbox account password or security state changed in a way that invalidated tokens. | Repeat section 7 to reconnect the mailbox. |
gmail.readonly. It cannot send, delete, or modify mail, and it never receives a password.For help connecting Gmail to MountainGoat, contact:
See also the companion Outlook / Microsoft Entra setup guide and the Sign in with Okta configuration guide.