Unified Mailbox Ai
by @l1tangdingzhen
Unified mailbox AI for both Outlook and Gmail. Checks unread emails, summarizes new mail with AI, detects meeting invitations, checks calendar conflicts on b...
clawhub install unified-mailbox-aiπ About This Skill
name: unified-mailbox-ai description: Unified mailbox AI for both Outlook and Gmail. Checks unread emails, summarizes new mail with AI, detects meeting invitations, checks calendar conflicts on both Outlook and Google Calendar, and sends Telegram notifications. Use when asked to check/monitor email from either or both accounts. homepage: https://github.com/L1TangDingZhen/email-monitor license: MIT allowed-tools: Bash Read Write metadata: {"openclaw":{"emoji":"π§","requires":{"bins":["python3"],"env":["EMAIL_MONITOR_TELEGRAM_USER"],"optionalBins":["gog"],"optionalEnv":["MS_GRAPH_ACCESS_TOKEN","EMAIL_MONITOR_GMAIL_ACCOUNT"]}}}
Unified Mailbox AI
Unified inbox monitor for Outlook and Gmail with AI summarization and calendar conflict detection. Either or both providers can be enabled β configure only what you need.
Accounts
MS_GRAPH_ACCESS_TOKEN (managed by the outlook-graph skill). If ~/.openclaw/ms_tokens.json is missing, Outlook is skipped.EMAIL_MONITOR_GMAIL_ACCOUNT env var and the gog CLI authorized. If unset, Gmail is skipped.EMAIL_MONITOR_TELEGRAM_USER is always required (the chat ID that receives notifications).When to Use
Credentials
Accounts are pre-configured via environment variables. Do not ask the user for credentials. Just run the scripts directly.Workflow (manual check)
1. Run the check command (returns JSON with new unread from configured accounts)
2. For each new email, summarize sender/subject/content
3. If it's a meeting invitation, check the configured calendar(s) for conflicts:
- Outlook calendar: use outlook-graph skill calendar-list
- Google Calendar: use gog calendar events primary --from
4. Report findings: conflict status on the same line as the summary
Check new emails
python3 {baseDir}/scripts/unified_mailbox_ai.py check
Mark email as processed (prevents duplicate notifications)
python3 {baseDir}/scripts/unified_mailbox_ai.py mark --id "EMAIL_ID"
> For Gmail threads, prefix the ID with gmail: e.g. gmail:19ceb0fc779a8a42Clear all notified records
python3 {baseDir}/scripts/unified_mailbox_ai.py clear
Auto-notify (used by cron β checks configured accounts, calls AI only if new emails found)
python3 {baseDir}/scripts/unified_mailbox_ai.py auto-notify
Calendar conflict check
Outlook calendar
python3 ~/.openclaw/workspace/skills/outlook-graph/scripts/outlook_graph.py calendar-list --days 7 --top 20
Google Calendar
GOG_KEYRING_PASSWORD="" GOG_ACCOUNT="$EMAIL_MONITOR_GMAIL_ACCOUNT" gog calendar events primary --from --to --json --no-input
Output format for each email
- [Outlook/Gmail] From: | Subject: |
[If meeting invite] Event: | Calendar: β οΈ Conflict with "" OR β
No conflict