<alias>@traddal.email address. Connecting
your own mailbox from Apps lets customer mail land in the Inbox and lets
pre-alerts, flow emails and replies go out from your real address. Both
providers work the same way: OAuth in a popup, an encrypted refresh token at
rest, and a per-mailbox sync that polls for new Inbox mail (Outlook also gets
push notifications).
For tenants
- Open Apps → Outlook or Gmail → Install (or Add mailbox to connect another account).
- Sign in and accept the permissions. Outlook can also connect a shared mailbox (sign in with a work account that has Full Access + Send As on it).
- New mail in that mailbox appears in Inbox within seconds; replies go back through the same account on the same conversation.
- To send flow emails and pre-alerts from the mailbox, pick it under Settings → Notifications → Sender.
Platform setup (operators of the Traddal deployment)
Both providers need an OAuth client registered once per environment and its credentials stored as Worker secrets. Nothing works until these are set — the app card reports “not configured”.Microsoft (Outlook)
- Entra admin center → App registrations → New. Supported account types: Accounts in any organizational directory and personal Microsoft accounts.
- Authentication → Web redirect URIs:
https://api.mytraddal.com/public/apps/outlook/callbackhttps://api.mytraddal-staging.com/public/apps/outlook/callbackhttp://localhost:8787/public/apps/outlook/callback
- API permissions (delegated):
offline_access,User.Read,Mail.Send,Mail.ReadWrite(+Mail.Send.Shared,Mail.ReadWrite.Sharedfor shared mailboxes). - Certificates & secrets → new client secret.
Google (Gmail / Google Workspace)
- Google Cloud Console → create/select a project → APIs & Services → Library → enable the Gmail API.
- OAuth consent screen: External, app name “Traddal”, support + developer
emails, authorized domain
mytraddal.com. Add scopeshttps://www.googleapis.com/auth/gmail.readonlyandhttps://www.googleapis.com/auth/gmail.send. While the app is in Testing, only listed test users can connect and refresh tokens expire after 7 days — publish the app (Gmail scopes are restricted, so Google runs a verification review before it’s public). - Credentials → Create credentials → OAuth client ID → Web application.
Authorized redirect URIs:
https://api.mytraddal.com/public/apps/gmail/callbackhttps://api.mytraddal-staging.com/public/apps/gmail/callbackhttp://localhost:8787/public/apps/gmail/callback
apps/api/.dev.vars. Optional
OUTLOOK_REDIRECT_URI / GMAIL_REDIRECT_URI override the callback URL the
Worker derives from its public origin.
Platform registry
The platform admin’s app catalogue (reference.platform_apps) gates each
provider: a coming_soon row hides Install. Flip Gmail to enabled once the
Google client is verified.
How sync works
Each connected mailbox gets its own Durable Object (OUTLOOK_SYNC /
GMAIL_SYNC) that keeps the provider cursor (Graph delta link / Gmail
history id) and polls adaptively (20 s after activity → 3 min idle). The
baseline on connect replays the last 2 hours only. The per-minute cron simply
re-ensures every connected mailbox has a running DO. Inbound mail runs through
the same pipeline as traddal.email mail (threading, agents, auto-drafts).