Connect Google (Gmail & Calendar) on a self-hosted server
Self-hosted Helpin includes the Google integration — Gmail sync, sending CRM email, and Google Calendar meetings in Meetings — but it ships with no shared Google credentials. Each server supplies its own Google OAuth client, so you (the server admin) create one OAuth app in Google Cloud and point Helpin at it.
This page covers the server-side setup. For what the integration does for end users, see Gmail and Google Calendar integration.
What you need
Admin access to the server's environment (or the
helpinCLI).A Google Cloud project where you can enable APIs and create an OAuth client.
A public
httpsAPP_BASE_URL. Google accepts a plainhttpredirect only forlocalhost, so any server reached by another hostname must behttps.CRM_ENCRYPTION_KEYset: OAuth tokens are encrypted with it.
What you configure
Setting | Required | Purpose |
|---|---|---|
| Yes | OAuth client ID of your Google Cloud OAuth client |
| Yes | OAuth client secret |
| Optional | Leave empty to use |
| Yes | Encrypts stored Google tokens |
The redirect URI is fixed: <APP_BASE_URL>/api/crm/email/oauth/callback. Leaving GMAIL_OAUTH_REDIRECT_URL empty is recommended — the server derives it from APP_BASE_URL, so it stays correct if the domain changes. If you set it explicitly, it must match APP_BASE_URL plus that callback path exactly, or the server reports a configuration problem and the Connect Google buttons stay disabled.
Step 1 — Create the Google OAuth client
Open the Google Cloud console credentials page.
Select (or create) your project, then enable the Gmail API and the Google Calendar API.
Configure the OAuth consent screen. Helpin requests these scopes:
gmail.readonly— import email conversations into CRMgmail.send— send and reply to CRM emailcalendar.readonly— show upcoming meetings in CRMplus offline access, so it can keep syncing in the background
Create an OAuth client ID of type Web application.
Add the authorized redirect URI:
https://<your-APP_BASE_URL>/api/crm/email/oauth/callbackCopy the generated client ID and client secret.
While the consent screen is unverified, only the test users you add to it can connect an account. Add each person's Google address, or complete Google's verification, before rolling it out.
Step 2 — Set the credentials on the server
Either edit the environment directly:
GMAIL_CLIENT_ID=your-client-id.apps.googleusercontent.com
GMAIL_CLIENT_SECRET=your-client-secret
GMAIL_OAUTH_REDIRECT_URL=
Or let the CLI write them. The client secret can come from a file or the HELPIN_GOOGLE_CLIENT_SECRET environment variable rather than an argument:
helpin configure --yes \
--google-client-id "your-client-id.apps.googleusercontent.com" \
--google-client-secret-file /run/secrets/google-client-secret
A previously stored key or secret is kept when you don't supply a new one. Then restart the server:
helpin restart
Step 3 — Verify the setup
Settings → System status shows a
google_workspacecapability:needs setup — the client is missing, or the redirect address isn't
APP_BASE_URLplus the callback path (or Google would refuse it).unable to verify — the configuration is present but nobody has connected an account yet.
ready — at least one account has connected.
helpin doctorreports the same state.While it still needs setup, Connect Google buttons are disabled with an explanation.
Once ready, members connect their own Google accounts in Settings → Email & calendar (or from Meetings). Each connection is per person — there is no shared mailbox.
Related: meeting capture is separate
Google Calendar events appear in Meetings through the Google connection above. Separately, meeting capture (recording/transcribing calls) uses its own provider — Recall or Vexa — with its own keys, webhook secret, and a public https APP_BASE_URL. Configure that with helpin configure --meeting-provider ...; it is not part of the Google OAuth client.
Troubleshooting
Symptom | Likely cause |
|---|---|
|
|
Connect Google disabled | Redirect URI or client missing; check Settings → System status |
Google refuses the redirect |
|
Only some people can connect | Consent screen is unverified — add them as test users or complete verification |
Login returns to Helpin but nothing syncs | Recheck enabled Gmail/Calendar APIs and the granted scopes |
Was this article helpful?