Gmail API email source
Version: 3.2.0 Date: 2026-11-17
Goal: A Workspace tenant with IMAP disabled can still deposit scans by email. Tower reads one mailbox through the Gmail API, same hourly poll and Check now as IMAP.
Solution: Email sources accept provider: gmail with a JSON key or Workload Identity. Tower impersonates the Workspace user (url) using domain-wide delegation (gmail.readonly). The cursor is Gmail historyId. Several labels or IMAP folders are configured on the filters step; senders and extensions stay global for the source.
Features:
- Wizard: IMAP or Google Workspace on the connection step, JSON upload or Workload Identity, mailbox/label chips on the filters step
auth: key-filestores the service-account JSON underkeys/;auth: workload-identitysigns the DWD JWT through IAMsignJwt- Demo source
Workspace inboxand operator docs (EN / FR), including a YAML example
Implementation Details:
- DWD is domain-wide; Tower only impersonates the configured
url. The numeric Client ID stays in Admin, not in Tower. - First poll uses unread mail when
historyIdis missing or expired. GET /taskswrites the task file before the state index and skips missing files, so listing never returns a 400 while a job is being created.
Files Modified:
src/protocol/source/email/gmail.client.ts- JWT / Workload Identity Gmail clientsrc/protocol/source/email/email.service.ts- poll, download, init per mailboxsrc/config.dto.ts/src/core/configuration/config.schema.ts-provider,auth, mailbox listui/src/pages/workflows/stepForms/StepInitForm.tsx- Workspace connection stepui/src/pages/workflows/stepForms/StepEmailForm.tsx- mailbox/label chipsui/src/protocol/tower.mock.ts- demo Workspace sourcedocs/user/configuration/gmail-workspace.md- prepare Workspace (EN / FR)docs/user/configuration/sources.md/examples.md- Gmail YAML (EN / FR)test/setup/seed-gitea.sh- Gitea seed uses the compose project container name
Release fragment: feat-gmail-workspace