Skip to content

Integration

Gmail integration

The Gmail integration reads the messages in a connected mailbox into the CRM with read-only access, and sends a message only when a person presses Send on a draft.

Last updated:

Key facts

Status
Available
Provider
Google
Connects through
OAuth 2.0 authorisation-code flow, with the code exchanged on the server.
What it can do in Gmail
Sends an email as the connected account, after a person presses Send on a draft.
Messages read in one sync run
Up to 75[14]
Manual syncs of one account
10 in 5 minutes[15]
Which mailbox sends
The first Gmail account connected to the workspace[16]

What does the Gmail integration do?

Connecting a Google account lets Orblex read the mailbox and file each message against the right account, contact and thread. Access to the mailbox is read-only: Orblex never modifies, labels, archives or deletes anything in it. The one thing it can do in Gmail is send, and it sends only a draft that a person has read and sent from Orblex. Synced messages are also read by an AI model into customer memory, when a model is configured.

What does Orblex read through the Gmail integration, and what does it keep?

It reads:

  • Messages in the connected mailbox: subject, body, sender, recipients and timestamps.
  • The thread each message belongs to.

It keeps:

  • The subject, the full body as text and as HTML, and a short snippet.
  • The sender, and the To, Cc and Bcc recipients.
  • When the message was sent or received, and its thread.

What it can do in Gmail:

  • Sends an email as the connected account, after a person presses Send on a draft.

Which Google permissions does the Gmail integration use?

One Google sign-in grants every permission below. OAuth 2.0 authorisation-code flow, with the code exchanged on the server. The client secret and the tokens never reach the browser.

The Google permissions the Gmail integration relies on, what each allows and what it is used for.
PermissionWhat Google allowsWhat Orblex uses it for
openid[8]Confirms which Google account signed in.Identifies the connected account.
email[8]The address of the Google account.Shown as the connected mailbox, and used so the mailbox owner's own domain is not mistaken for a customer.
profile[8]The name on the Google account.Shown beside the connected mailbox.
https://www.googleapis.com/auth/gmail.readonly[8]Read messages and settings in Gmail. It cannot change anything.Reads messages into the CRM. The narrower read-only scope is requested on purpose instead of the one that can modify a mailbox.
https://www.googleapis.com/auth/gmail.send[8]Send email as the account. It cannot read mail or create drafts in Gmail.Sends a message only after a person has pressed Send on a draft in Orblex.
https://www.googleapis.com/auth/calendar.readonly[8]Read calendar events. It cannot create or change them.Reads events on the primary calendar so meetings appear against the right account.

When does the Gmail integration sync?

A sync is a background job. Mail is read when the account is connected, and mail and calendar are read whenever someone presses Sync now. There is no automatic timer in the current version.

  • Connecting the Google account queues the first mail sync straight away.
  • Sync now, in Settings under Integrations, queues a mail sync and a calendar sync for that account.
  • The calendar is first read when Sync now is pressed. Connecting the account queues the mail sync only.

How are the Google credentials protected?

  • Tokens are encrypted with AES-256-GCM before they are written to the database.[17]
  • A fresh random 12-byte initialisation vector is used for every token.[17]
  • Tokens are decrypted only on the server, for the length of a request. The module that holds them cannot be imported into browser code.[18]
  • The connection flow is protected against forged callbacks by a signed state token that expires after 10 minutes.[19]

What is kept about the connected account itself:

  • The Google account id, the address and the display name of the connected account.
  • The access token and the refresh token, encrypted.
  • The scopes that were granted, the time of the last sync and the last sync error, if any.

What happens when the Gmail integration is disconnected?

In Settings, under Integrations, press Disconnect on the account. Access can also be revoked from the Google account's own security settings at any time.

Disconnecting does this:

  • Deletes the stored access token and refresh token, so no working key is left in the database.
  • Stops all further syncing and sending through that account.
  • Frees the account's slot against the plan's ceiling on connected accounts.
  • Writes an audit entry naming who disconnected it.

And it leaves this as it was:

  • It does not delete messages and meetings that were already synced. They stay on the records they were attached to unless they are deleted there.
  • It does not remove the facts already read from those messages into customer memory.
  • It does not remove the row for the connected account, which is kept so the emails it produced keep their provenance.
  • It does not revoke the grant on Google's side. That is done in the Google account's security settings.

What are the limits of the Gmail integration?

Every limit on the Gmail integration, with the value the code enforces.
LimitValueWhy, or how it applies
Messages read in one sync run[14]Up to 75Three pages of 25. The position is saved after every page, so the next run carries on from there.
Manual syncs of one account[15]10 in 5 minutes
Which mailbox sends[16]The first Gmail account connected to the workspaceA workspace sends through one account, the one connected earliest that is still connected.
Times one draft can be sent[4]OnceThe draft is claimed before the provider is called, so a double-click cannot mail somebody twice.

What does the Gmail integration not do?

  • It does not modify, label, archive or delete anything in the mailbox.
  • It does not send anything on its own. No model, agent, automation or sequence can reach the send step.
  • It does not read or send attachments.
  • It does not sync on a timer. A sync runs on connection and when someone presses Sync now.
  • It does not create or change drafts inside Gmail. Drafts live in Orblex until they are sent.

Questions and answers

Which mailboxes and calendars connect?

Gmail and Google Calendar today, through Google OAuth with read and send scopes you can revoke at any time. The integration sits behind a provider interface, so other mail and calendar back ends are a matter of writing an adapter rather than reworking the product.

How are my mailbox credentials protected?

Google access and refresh tokens are encrypted with AES-256-GCM before they are written to the database, and are decrypted only on the server. They never reach the browser, and disconnecting the mailbox deletes them.

What Google permissions does Orblex ask for?

It asks for 6 scopes: openid, email and profile to identify the account, read-only access to Gmail, permission to send mail, and read-only access to Calendar. It does not ask for permission to modify, label or delete anything in the mailbox.

What happens when I disconnect my mailbox?

The stored tokens are deleted, and all syncing and sending through that account stops. Messages and meetings that were already synced stay on the records they were attached to, along with the facts read from them, unless you delete them.

Sources

  1. src/lib/email/providers/gmail.ts (GmailProvider)
  2. src/lib/email/sync.ts (syncAccount)
  3. src/lib/email/ingest.ts (ingestMessages)
  4. src/lib/email/send.ts (sendDraft)
  5. tests/unit/gmail-normalize.test.ts
  6. tests/integration/email-ingest.test.ts
  7. tests/integration/email-send.test.ts
  8. src/lib/integrations/google.ts (GOOGLE_SCOPES)
  9. src/lib/integrations/google.ts (googleAuthUrl)
  10. src/lib/integrations/accounts.ts (disconnectAccount)
  11. src/lib/integrations/state.ts (verifyOAuthState)
  12. src/lib/actions/integrations.ts (disconnectAccountAction)
  13. GOOGLE_SETUP.md
  14. src/lib/email/sync.ts
  15. src/lib/security/rate-limit.ts
  16. src/lib/email/send.ts (sendingAccount)
  17. src/lib/security/crypto.ts
  18. src/lib/integrations/accounts.ts (accessTokenFor)
  19. src/lib/integrations/state.ts
  20. src/lib/email/types.ts (EmailProvider)
  21. src/lib/security/crypto.ts (encryptSecret)

Last verified:

Request early access

Orblex is in early access. It has been public at orblex.app since 5 October 2026 and is opening to a small group of sales teams before a wider launch. A person replies within one working day.

Get Early Access