Skip to main content

Connecting Email Accounts

Campbooks connects to your email provider over OAuth — it never sees your password, and the refresh token it stores is encrypted at rest. It supports Zoho Mail, Google Workspace (Gmail), and Microsoft 365.

Calendar comes along for the ride. Connecting a Google or Zoho mailbox requests calendar scopes on the same grant, so your calendar syncs automatically — there's no separate calendar connect flow. See Calendar.

Supported providers

ProviderAPIConsoleMail callback
Zoho MailZoho Mail REST APIZoho API Console/oauth/zoho/callback
Google WorkspaceGmail APIGoogle Cloud Console/oauth/gmail/callback
Microsoft 365Microsoft GraphEntra admin center/oauth/microsoft/callback

Whitelist each callback URL as <your-app-url>/oauth/<provider>/callback — e.g. http://localhost:3000/oauth/gmail/callback locally, or https://app.example.com/oauth/gmail/callback in production.

Zoho Mail

1. Create a Zoho API client

  1. Go to the Zoho API Console.
  2. Create a new Server-based Application.
  3. Add the redirect URI: <your-app-url>/oauth/zoho/callback.
  4. Note your Client ID and Client Secret.

2. Configure environment variables

ZOHO_CLIENT_ID=your_client_id
ZOHO_CLIENT_SECRET=your_client_secret
ZOHO_REGION=eu # eu | com | in | au | jp — match your Zoho data center

3. Connect in Campbooks

  1. Go to Settings → Email Accounts and click Add Email Account.
  2. Choose Zoho Mail and authorize the connection on Zoho.
  3. After authorization, Campbooks stores an encrypted refresh token and starts the first scan.

Google Workspace (Gmail)

1. Create a Google Cloud project

  1. Go to the Google Cloud Console and create a project.
  2. Enable the Gmail API and the Google Calendar API.
  3. Create OAuth 2.0 credentials (type: Web application).
  4. Add the redirect URI: <your-app-url>/oauth/gmail/callback.

2. Configure environment variables

GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret

3. Connect in Campbooks

  1. Go to Settings → Email Accounts and click Add Email Account.
  2. Choose Google Workspace and authorize through Google's consent screen.

The Gmail connection and the interactive Send to Drive integration are separate Google apps — Drive uses Google's restricted full-drive scope and its own /oauth/google/callback. See Google Drive.

Microsoft 365

1. Register an Entra application

  1. Go to the Entra admin centerApp registrations → New registration.
  2. Supported account types: Accounts in any organizational directory (work/school accounts — the app uses the /organizations/ endpoint).
  3. Add a Web redirect URI: <your-app-url>/oauth/microsoft/callback.
  4. Create a client secret.

2. Configure environment variables

MICROSOFT_CLIENT_ID=your_client_id
MICROSOFT_CLIENT_SECRET=your_client_secret
ENABLE_MICROSOFT_MAILBOX=1 # reveals the "Connect Microsoft 365" button

3. Connect in Campbooks

  1. Go to Settings → Email Accounts and click Add Email Account.
  2. Choose Microsoft 365 and authorize through Microsoft's consent screen.

Sharing accounts

A connected mailbox can be shared with other people in your workspace with per-user view or send permissions, so a team can work one inbox without sharing a password. Every surface — the web app, Scout, and workflows — enforces the same permission gate.

After connecting

Once an account is connected, Campbooks keeps it in sync automatically. See Email Scanning for how scanning and processing work.