The Gmail integration lets the Inbox pull customer mail automatically. Tokens are stored per tenant. The steps below are a one-time Google Cloud setup so users can hit Connect Gmail in Settings → Integrations.
What you need
- A Google account with permission to create a Cloud project.
- The public host where FixControl runs (e.g.
https://app.example.com). The OAuth redirect must match it exactly.
Step 1: Google Cloud project
- Go to console.cloud.google.com and create a new project, e.g.
fixcontrol-prod. - Open APIs & Services → Library, search for Gmail API, and click Enable.
- (Optional, for push notifications later) also enable Cloud Pub/Sub API.
Step 2: OAuth consent screen
- APIs & Services → OAuth consent screen.
- Pick External (Internal/Workspace-only works too, but then every user must be in the same Workspace).
- Fill in app name, support email, and developer contact. Logo and homepage can be placeholders to start.
- Under Scopes, add
gmail.readonly,gmail.modify,openid,email, andprofile— these are the exact five FixControl asks for during consent. - Test users — add every Gmail address you plan to connect while the app is in Testing mode. This is the most common pitfall: a user not on this list gets
access_deniedon the consent screen. - Only flip to
In productionafter Google verifies the app. For internal toolsTestingis usually fine — just be aware of the 100 test-user cap and the 7-day refresh-token expiration that comes with it.
Step 3: OAuth Client ID + redirect URI
- APIs & Services → Credentials → Create credentials → OAuth client ID.
- Application type: Web application.
- Authorized redirect URIs: add:
`` https://<your-host>/api/auth/gmail/callback ``
You can register multiple redirect URIs if you want to share one client across environments.
- Click Create and copy the Client ID and Client secret. The secret is no longer readable after you leave this dialog — store it in your secret manager right away. Provide the Client ID, Client secret, and redirect URI to FixControl during initial setup.
Heads up: the redirect URI in Google Cloud must match the one configured in FixControl byte for byte. A trailing slash,httpvshttps, orapp.example.comvswww.app.example.comwill produceredirect_uri_mismatch.
Step 4: Connect from FixControl
- Sign in as a tenant admin and open Settings → Integrations.
- Click Connect Gmail. You'll be redirected to Google's consent screen.
- Pick the Gmail account, approve the scopes, and you'll land back on the Integrations page with the new Gmail connection listed.

Within a few minutes the Inbox will start pulling unread mail. You can connect multiple Gmail accounts per tenant — recipient routing decides which To: address belongs to which tenant.
(Optional) Pub/Sub push
For near-realtime intake you can register a users.watch:
- Create a Pub/Sub topic, e.g.
projects/<project>/topics/gmail-fixcontrol. - Grant
gmail-api-push@system.gserviceaccount.comthe Pub/Sub Publisher role on that topic. - Create a push subscription whose endpoint is
https://<your-host>/api/gmail/webhook?token=<verify-token>, where the verify token is a random string of 32+ characters you also provide to FixControl.
Gmail watches expire after ~7 days — FixControl re-registers them automatically as long as the connection stays active.
FAQ
I'm getting `redirect_uri_mismatch`. Compare the redirect URI configured in FixControl to the URI under Credentials → OAuth client → Authorized redirect URIs character by character. Google's console can lag a minute after saving — give it a moment.
`access_denied` on the consent screen. The app is in Testing mode and the Gmail address isn't a test user. Add it under OAuth consent screen → Test users.
No `refresh_token` after connecting. Shouldn't happen — FixControl forces prompt=consent. If it does, revoke access at myaccount.google.com/permissions and reconnect.
Do I have to get the app verified by Google? Only if you go beyond 100 test users or you don't want users to see the unverified-app warning. Internal installs typically don't need verification.