gmail-sync
Least-privilege, read-only Gmail ingestion. Restricted to gmail.readonly via domain-wide
delegation to one explicit mailbox (GOOGLE_GMAIL_SUBJECT).
{ "dryRun": true }
{ "confirm": true, "lookbackDays": 3 }
Uses a bounded overlap window and idempotent upserts; fails closed when GMAIL_SYNC_QUERY is
unset rather than scanning the whole mailbox. Only confidently project-matched events are exposed
to chat/board generation — raw cached mail stays admin/lead-only. Full status and the Workspace
governance blockers are on the Gmail connector page.
Where the code lives
sable-agents-demo/supabase/functions/gmail-sync/index.ts,logic.js