Connect Gmail / Outlook (OAuth) and sync emails
Connect your Google Workspace (Gmail) or Microsoft 365 (Outlook) account via OAuth, using your own organization's OAuth app, and automatically log emails as activities on your contacts.
You can connect your Google Workspace (Gmail) or Microsoft 365 (Outlook) mailbox to the CRM. Once connected, the CRM reads your recent emails and, for each message whose sender or recipient matches a Contact or Lead (by email), logs an "email" activity on that record's timeline.
The model is BYO ("bring your own"): you use your own organization's OAuth app. We never see your credentials and there is no cost on our side. The integration starts inert: nothing happens until you set up the OAuth app and connect the account.
Prerequisites
- A Google Workspace (Gmail) OR Microsoft 365 (Outlook) account. Your regular work account is fine.
- Permission to create an OAuth app in your organization: access to the Google Cloud Console (Gmail) or the Azure Portal / Microsoft Entra ID (Outlook). In companies, this usually requires an IT administrator.
- In Sellio, administrator access (permission to manage settings) to save the app credentials in Settings → Integrations. Connecting the mailbox itself (Step 3) is done by each user for their own account.
Step 1: Create your organization's OAuth app
Google Workspace (Gmail): in the Google Cloud Console, create a project, configure the OAuth consent screen, enable the Gmail API and create an "OAuth client ID" credential (Web application). Copy the Client ID and the Client Secret.
Microsoft 365 (Outlook): in the Azure Portal, go to Microsoft Entra ID → App registrations → New registration. Under "Certificates & secrets", generate a Client Secret. Under "API permissions", add Microsoft Graph with the delegated permissions Mail.Read and User.Read. Copy the Client ID (Application ID) and the Client Secret.
Step 2: Paste the credentials into the CRM
- Open Settings → Integrations and find the "Google Workspace (Gmail)" or "Microsoft 365 (Outlook)" card.
- Copy the redirect URI shown and register it in your OAuth app (Step 1).
- Paste the Client ID and the Client Secret and click "Save app credentials". The Client Secret is stored encrypted and is never displayed back.
Step 3: Connect your account
- Still on the card, click "Connect". You will be taken to the provider's consent screen, already signed in to your account.
- Authorize read access to email. You return to the CRM and the card now shows "Connected as" with the account address.
- Click "Sync emails" to pull in recent emails now. The CRM tells you how many emails it read and how many activities it created.
Each user connects their own mailbox: the sync runs in the context of whoever connected it. Emails become activities only when the sender or recipient matches an existing Contact or Lead (by the email field). Emails that match no record are ignored.
Security and privacy
Access and refresh tokens are stored encrypted and are never displayed. The access token is renewed automatically when it expires, without a new login. The email connection is completely separate from your CRM login: connecting or disconnecting here does not change how you sign in to the system.
How to test
- After connecting (Step 3), confirm the card shows "Connected as" with the right address.
- Click "Sync emails". The CRM tells you how many emails it read and how many activities it created.
- Open a Contact or Lead you know has recently exchanged emails and check the timeline: an activity of type "Email" should appear.
Troubleshooting
- Error "redirect_uri_mismatch" or the provider refuses the connection: the redirect URI registered in the OAuth app differs from the one shown on the card. Copy it again and paste it EXACTLY the same (same domain, same trailing slash).
- 401/invalid_client when connecting: wrong Client ID or Client Secret. Re-enter the credentials on the card (the Secret never comes back from the server, so re-paste it in full).
- Connects, but does not create activities: emails only become activities when the sender/recipient matches a Contact or Lead by the email field. Emails with no match are ignored, so add the email to the record.
- "Access denied" / consent screen blocked: on Google, publish the OAuth consent screen (or add the user as a tester); on Azure, grant admin consent to the permissions.
- The connection stopped working (e.g., after changing the account password): click "Reconnect" on the card to redo consent and renew the tokens.