╔═══════════════════════════════════════╗
║  EXPERIMENT #6: GMAIL→NOTION SYNC     ║
║  ────────────────────────────────────  ║
║  MULTI-USER OAUTH + HTML PARSING      ║
║  Workers AI + Notion API 2025-09-03   ║
║                                       ║
║  TIME: 11hrs | SAVINGS: 55-65%       ║
║  COST: $6.30 | SYNC: Every 5min     ║
║  USERS: Multi-user OAuth support     ║
╚═══════════════════════════════════════╝
Automation

Multi-User Gmail→Notion Sync - OAuth, HTML Parsing, and AI Summarization at Scale

Email trapped in Gmail, Notion is where work lives. Built multi-user sync: OAuth for multiple users, converts HTML emails to formatted Notion blocks (bold, italic, links, headings, lists), Workers AI generates summaries, tracks synced threads in KV. Challenges: Notion 2025-09-03 API (new data_source_id), UTF-8 mojibake, rich_text 100-item limit. Production stable: 5-minute cron, ~2% error rate. Development: 11 hours vs 25-30 manual (55-65% savings), cost $6.30.

November 19, 2025
24 min read
advanced
Tags:
oauth-integrationhtml-parsingcloudflare-workers-ai