Skip to main content
Version: 3.2.0

feat-gmail-workspace

✨ New Features​

[Gmail API email source]​

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-file stores the service-account JSON under keys/; auth: workload-identity signs the DWD JWT through IAM signJwt
  • Demo source Workspace inbox and 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 historyId is missing or expired.
  • GET /tasks writes 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 client
  • src/protocol/source/email/email.service.ts - poll, download, init per mailbox
  • src/config.dto.ts / src/core/configuration/config.schema.ts - provider, auth, mailbox list
  • ui/src/pages/workflows/stepForms/StepInitForm.tsx - Workspace connection step
  • ui/src/pages/workflows/stepForms/StepEmailForm.tsx - mailbox/label chips
  • ui/src/protocol/tower.mock.ts - demo Workspace source
  • docs/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