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
- 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.
| Permission | What Google allows | What 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?
| Limit | Value | Why, or how it applies |
|---|---|---|
| Messages read in one sync run[14] | Up to 75 | Three 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 workspace | A workspace sends through one account, the one connected earliest that is still connected. |
| Times one draft can be sent[4] | Once | The 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
src/lib/email/providers/gmail.ts(GmailProvider)src/lib/email/sync.ts(syncAccount)src/lib/email/ingest.ts(ingestMessages)src/lib/email/send.ts(sendDraft)tests/unit/gmail-normalize.test.tstests/integration/email-ingest.test.tstests/integration/email-send.test.tssrc/lib/integrations/google.ts(GOOGLE_SCOPES)src/lib/integrations/google.ts(googleAuthUrl)src/lib/integrations/accounts.ts(disconnectAccount)src/lib/integrations/state.ts(verifyOAuthState)src/lib/actions/integrations.ts(disconnectAccountAction)GOOGLE_SETUP.mdsrc/lib/email/sync.tssrc/lib/security/rate-limit.tssrc/lib/email/send.ts(sendingAccount)src/lib/security/crypto.tssrc/lib/integrations/accounts.ts(accessTokenFor)src/lib/integrations/state.tssrc/lib/email/types.ts(EmailProvider)src/lib/security/crypto.ts(encryptSecret)
Last verified:
Related pages
- Record keeping from mail and meetingsOrblex files each synced email and calendar event against the right account, contact and thread by fixed rules, so an account's timeline is built…
- Customer memoryCustomer memory is the store of what customers have said, kept as typed facts that each carry a confidence level and the email or meeting they came from.
- Approval queueThe approval queue, called AI work in the app, is where everything the AI has prepared waits for a person, and nothing in it is written to a record or sent…
- SequencesA sequence is multi-step email outreach in which Orblex writes each step as a draft when it falls due and a person sends every one; the sequence itself never…
- Google Calendar integrationThe Google Calendar integration reads events from the primary calendar with read-only access and turns them into meetings linked to the right account.
- Orblex securityHow Orblex, an AI-native CRM, handles customer data: each control with the test or code behind it, what the AI cannot do, and what it is not certified for.
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