Skip to main content

Google Integration (Gmail & Calendar)

Setting up Google (Gmail & Calendar)#

OAuth 2.0 / Service Account~5 min personal, 15 min organization setup

Bidirectional sync between Google Workspace and Coeffection. Emails land on contact timelines automatically, calendar events sync in real time, and outbound email is sent from your actual Gmail address — so recipients see your name, not a CRM alias.

Coeffection supports two connection modes. Personal Connection is fastest — each user connects their own Google account via OAuth and is up and running in under a minute. Organization Connectionuses Google's Domain-Wide Delegation so an admin connects once and every user in the Workspace domain is synced automatically — no individual OAuth flows, no per-user setup, and employees added later are connected immediately.

Supported Features

FeatureDetailsStatus
Email sync (inbound)Incoming emails matched to CRM contacts appear on the contact timelineSupported
Email sync (outbound)Emails sent from Coeffection go through your Gmail — recipients see your addressSupported
Email threadingReplies are grouped into conversation threads with In-Reply-To headersSupported
File attachmentsSend and receive attachments up to 25 MB via MIME encodingSupported
Rich text composeFormatting toolbar (bold, italic, links, lists) in the compose and reply editorSupported
Calendar syncGoogle Calendar events sync bidirectionally — create in either placeSupported
Meeting linksGoogle Meet links auto-generated when creating calendar events from the CRMSupported
Contact matchingIncoming emails auto-matched to CRM contacts by email addressSupported
Gravatar avatarsExternal sender avatars resolved via Gravatar; internal users show CRM profile photoSupported

Option A — Personal Connection

Before you begin

  • A Google account (Gmail or Google Workspace)
  • Admin or Manager role in Coeffection
  1. 1Go to Admin → Integrations and click the Google (Gmail & Calendar) card.
  2. 2Click "Connect My Account" — a Google OAuth popup will open.
  3. 3Sign in with the Google account you use for work email (use your personal work email, not a shared admin account).
  4. 4Review the permission scopes and click "Allow". Coeffection requests: read and send email, manage calendar events, and view your email address.
  5. 5Your Gmail inbox and Google Calendar will begin syncing immediately. Existing emails matching CRM contacts will backfill onto their timelines.
Once connected, open any contact record and scroll to the Email section — you should see recent email threads with that contact. Click Compose to send an email from your Gmail address directly within the CRM.

Option B — Organization Connection (Domain-Wide Delegation)

This is the recommended setup for teams of 5+ users. An admin completes the setup once and every user in the Google Workspace domain is connected automatically — no individual OAuth flows needed. New employees are connected the moment they are added to the Workspace domain.

Before you begin

  • Google Workspace (not personal Gmail — delegation requires an organization domain)
  • Super Admin access in Google Admin Console (admin.google.com)
  • A Google Cloud project with billing enabled (free tier is sufficient)
  • Admin role in Coeffection

Part 1 — Create a Google Cloud Service Account

  1. 1Go to console.cloud.google.com and select (or create) the project you want to use.
  2. 2Navigate to APIs & Services → Library. Search for and enable: Gmail API, Google Calendar API, and People API.
  3. 3Navigate to IAM & Admin → Service Accounts. Click "Create Service Account".
  4. 4Name it something descriptive like "Coeffection CRM Delegation" and click Create and Continue.
  5. 5Skip the optional role and user access steps — click Done.
  6. 6Click into the new service account. Go to the Details tab and check "Enable Google Workspace Domain-wide Delegation". Copy the Client ID shown — you will need it in Part 2.
  7. 7Go to the Keys tab. Click Add Key → Create new key → JSON. A .json file will download — this is your service account credential file. Store it securely.
Google Cloud Console — Service Account Keys
SA

coeffection-crm-delegation

coeffection-crm@project-id.iam.gserviceaccount.com

Client ID:1148274832847294Copy
Domain-wide delegation:Enabled

Keys

JSON keya1b2c3d4e5f6
Created Apr 6, 2026

Part 2 — Grant Domain-Wide Delegation Scopes

  1. 1Go to admin.google.com and sign in as a Super Admin.
  2. 2Navigate to Security → Access and data control → API controls.
  3. 3Scroll down to "Domain-wide delegation" and click Manage Domain-wide Delegation.
  4. 4Click "Add new". In the Client ID field, paste the Client ID you copied from the service account.
  5. 5In the OAuth scopes field, paste the following scopes (comma-separated):
https://www.googleapis.com/auth/gmail.send,
https://www.googleapis.com/auth/gmail.readonly,
https://www.googleapis.com/auth/gmail.modify,
https://www.googleapis.com/auth/calendar,
https://www.googleapis.com/auth/calendar.events,
https://www.googleapis.com/auth/userinfo.email
  1. 1Click Authorize. The service account now has permission to act on behalf of any user in your domain for these scopes.
Google Admin Console — Domain-wide Delegation

API Clients

Client IDOAuth Scopes
114827483284

gmail.send, gmail.readonly, gmail.modify

calendar, calendar.events, userinfo.email

Part 3 — Connect in Coeffection

  1. 1In Coeffection, go to Admin → Integrations → Google (Gmail & Calendar).
  2. 2Click "Connect My Organization".
  3. 3Enter your Google Workspace domain (e.g. yourcompany.com).
  4. 4Upload the JSON key file you downloaded in Part 1.
  5. 5Click "Verify & Save". Coeffection will test the delegation by reading a sample inbox — if scopes are correct, the connection is confirmed.
  6. 6All users in your Workspace domain are now connected. Email sync, calendar sync, and send-as capabilities are active for every user.
Verify the connection by opening any user's contact record — their email threads should be loading. Send a test email from the compose box and confirm it appears in the recipient's inbox with the correct "From" address.

Troubleshooting

I see "unauthorized_client" when verifying the connection
This means the Domain-Wide Delegation step (Part 2) was missed or the Client ID was entered incorrectly. Go to Google Admin Console → Security → API Controls → Domain-wide Delegation and verify the Client ID matches the one on your service account. Make sure all 6 scopes are listed.
I see "Organization Policy blocks service account key creation"
Your Google Workspace has an organization policy (iam.disableServiceAccountKeyCreation) that prevents JSON key downloads. Ask your Workspace Super Admin to temporarily disable this policy under Google Cloud Console → IAM → Organization Policies, create the key, then re-enable the policy.
Emails are sending from the wrong address
Domain-Wide Delegation impersonates each user by their email address. If the "From" address is wrong, check that the user's email address in Coeffection matches their Google Workspace email exactly. The match is case-insensitive but must be the primary email, not an alias.
Calendar events aren't syncing
Make sure the Google Calendar API is enabled in your Google Cloud project (APIs & Services → Library → Google Calendar API). Also verify the calendar and calendar.events scopes are included in your Domain-Wide Delegation configuration.
I only want to connect my own account, not the whole org
Use Option A (Personal Connection) instead. You can mix both modes — some users can use personal OAuth while the organization connection covers everyone else. Personal connections take priority when both exist for the same user.
Organization Connection is recommended for teams of 5+ users. It eliminates per-user OAuth flows, automatically connects new employees, and ensures consistent sync settings across the organization. Personal Connection is best for solo users or small teams where each person manages their own Google account.