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
| Provider | API | Console | Mail callback |
|---|---|---|---|
| Zoho Mail | Zoho Mail REST API | Zoho API Console | /oauth/zoho/callback |
| Google Workspace | Gmail API | Google Cloud Console | /oauth/gmail/callback |
| Microsoft 365 | Microsoft Graph | Entra 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
- Go to the Zoho API Console.
- Create a new Server-based Application.
- Add the redirect URI:
<your-app-url>/oauth/zoho/callback. - 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
- Go to Settings → Email Accounts and click Add Email Account.
- Choose Zoho Mail and authorize the connection on Zoho.
- After authorization, Campbooks stores an encrypted refresh token and starts the first scan.
Google Workspace (Gmail)
1. Create a Google Cloud project
- Go to the Google Cloud Console and create a project.
- Enable the Gmail API and the Google Calendar API.
- Create OAuth 2.0 credentials (type: Web application).
- 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
- Go to Settings → Email Accounts and click Add Email Account.
- 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
- Go to the Entra admin center → App registrations → New registration.
- Supported account types: Accounts in any organizational directory (work/school accounts — the app uses the
/organizations/endpoint). - Add a Web redirect URI:
<your-app-url>/oauth/microsoft/callback. - 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
- Go to Settings → Email Accounts and click Add Email Account.
- 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.