MountainGoat · Email Sync

Gmail Email Sync: MountainGoat Configuration Guide

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:

1.Overview

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:

2.Prerequisites

Time required: about 15 minutes.

3.Create the Google Cloud project

  1. Go to https://console.cloud.google.com and sign in with your Workspace admin account.
  2. Click the project picker in the top bar, then New project. Name it MountainGoat Integration and create it.
  3. Select the new project.
  4. Enable the Gmail API: left menu → APIs & Services → Library, search for "Gmail API", click Enable.
  1. Go to APIs & Services → OAuth consent screen.
  2. Choose User type Internal.
  3. Set the app name to 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.

5.Create the OAuth client

  1. Go to APIs & Services → Credentials → Create credentials → OAuth client ID.
  2. Application type: Web application. Name: MountainGoat.
  3. Under Authorized redirect URIs, click Add URI and enter the value below, replacing {app.subdomain} with your subdomain label.
  4. Click Create. A dialog shows the Client ID and Client secret. Copy both.

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.

6.Enter the credentials in MountainGoat

Sign in to your MountainGoat instance as an administrator, then:

  1. Click Settings under the user profile.
  2. Select the Admin tab → API & CredentialsEmail CredentialsGmail OAuth App Configuration.
MountainGoat fieldWhat 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.

7.Connect the mailbox

The person who owns the purchase-order mailbox completes the one-time connection:

  1. Sign in to MountainGoat and go to Settings → Admin → Setup → Inbox Connections.
  2. Click Connect Gmail.
  3. Sign in as the purchase-order mailbox account and approve Google's read-only consent screen.

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.

8.Troubleshooting

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

9.Security and privacy notes

10.Support

For help connecting Gmail to MountainGoat, contact:

help@mountaingoat.ai

See also the companion Outlook / Microsoft Entra setup guide and the Sign in with Okta configuration guide.