Acumatica · Integration

Acumatica Google Workspace Integration — A Complete Guide

Acumatica Google Workspace Integration — A Complete Guide is the kind of integration that pays for itself the first time it runs without intervention.

John Kihiu12 min read

Most Google Workspace requests I get on Acumatica projects are really three separate asks wearing one label: SSO login via Google, sending mail through a Workspace domain's Gmail account rather than a generic SMTP relay, and syncing calendar or Drive documents against records. Each uses a different Google API surface and a different auth grant, and treating "Google Workspace integration" as one task instead of three is how scope creeps sideways mid-project.

SSO: OpenID Connect, mapped through Acumatica's federated login

Google Workspace SSO into Acumatica goes through standard OpenID Connect, Acumatica's federated authentication configuration (the same subsystem used for Azure AD or Okta) accepts Google as an OIDC provider once you register an OAuth 2.0 client in Google Cloud Console and point Acumatica's identity provider settings at Google's discovery document:

TEXT · Acumatica OIDC provider config (Identity Provider screen)
Issuer:                https://accounts.google.com
Authorization Endpoint: https://accounts.google.com/o/oauth2/v2/auth
Token Endpoint:         https://oauth2.googleapis.com/token
Client ID:              <from Google Cloud Console OAuth client>
Client Secret:          <from Google Cloud Console OAuth client>
Scope:                  openid email profile

The part that trips up first-time setups: Acumatica matches the incoming federated identity to an existing Acumatica user by email, and that match is exact, a Google Workspace account's primary email must equal the Acumatica user's login email precisely, including domain. Alias addresses or a secondary Workspace domain on the same account will not match and produce a confusing "no matching user" error that looks like a config problem when it's actually a data mismatch.

Sending notifications through the Gmail API instead of generic SMTP

Clients who've standardized on Workspace often want outbound Acumatica notifications (Business Events emails, AR statements) to come from a real Workspace mailbox via the Gmail API rather than a generic SMTP relay, mostly for deliverability, mail genuinely sent through Google's infrastructure with proper SPF/DKIM alignment lands in inboxes more reliably than a third-party relay pretending to be a Workspace domain. This requires a service account with domain-wide delegation, not a simple OAuth user grant:

C# · Gmail API send via domain-wide delegated service account
var credential = GoogleCredential.FromFile("service-account.json")
    .CreateScoped(GmailService.Scope.GmailSend)
    .CreateWithUser("erp-notifications@clientdomain.com"); // the delegated mailbox

var gmail = new GmailService(new BaseClientService.Initializer { HttpClientInitializer = credential });

var rawMessage = Convert.ToBase64String(Encoding.UTF8.GetBytes(mimeMessage))
    .Replace('+', '-').Replace('/', '_');
await gmail.Users.Messages.Send(new Message { Raw = rawMessage }, "me").ExecuteAsync();
Domain-wide delegation is a Workspace admin action, not a developer one

The service account's client ID has to be explicitly authorized in the Workspace Admin Console under Security > API Controls > Domain-wide Delegation, scoped to exactly the Gmail scopes you need. I've had integrations blocked for days waiting on a client's IT admin to complete this one step, flag it as a dependency in the project plan on day one, not when you hit the permission error during testing.

Drive as an attachment backend: reuse Acumatica's file API abstraction

For clients wanting Acumatica document attachments (AP bills, signed contracts) mirrored into a Google Drive shared folder rather than staying purely in Acumatica's own file storage, I hook into PXNoteAttribute's file-added event and push a copy to Drive via a service account scoped to a specific shared drive, storing the returned Drive file ID back on a small custom DAC so the two stay linked. I do not treat Drive as the source of truth, Acumatica's own attachment storage remains authoritative, and Drive is a one-way mirror for users who want to browse documents outside the ERP UI. Trying to make it bidirectional (editing in Drive, syncing back) is a substantially harder problem I steer clients away from unless they have a very specific reason to need it.

Calendar sync: scope it to one direction and one entity type

Calendar integration requests (syncing Acumatica Service Order appointments to a technician's Google Calendar) work best one-directional, Acumatica-to-Google, using the Calendar API's service-account-with-delegation pattern again. Two-way sync sounds appealing in a sales conversation but in practice requires reconciling conflicting edits made independently in both systems, which is a genuinely hard distributed-state problem I've only seen justify its complexity once, for a client with very high appointment-reschedule volume from the field-technician side.

Wrapping up

"Google Workspace integration" is shorthand for at least three separate, differently-scoped pieces of work: OIDC-based SSO matched strictly by email, Gmail API sending through a domain-delegated service account for deliverability, and one-directional Drive or Calendar mirroring rather than full bidirectional sync. Scope each piece explicitly with the client before estimating, and get the Workspace admin's domain-wide delegation step scheduled early since it's outside your control as the developer.

John Kihiu
Acumatica ERP Developer · Laravel Engineer

Independent software engineer in Nairobi specialising in Acumatica customisations, Laravel backends, and tax fiscalisation integrations across East and Southern Africa.