email-triageIMAP email scanning and triage with AI classification via a local Ollama LLM. Scans unread emails, categorizes them as urgent, needs-response, informational,...
Install via ClawdBot CLI:
clawdbot install briancolinger/email-triageScan your IMAP inbox, classify emails into priority categories, and surface the ones that need attention. Uses a local LLM (Ollama) for intelligent classification with a rule-based heuristic fallback when Ollama is unavailable.
| Icon | Category | Description |
|------|----------|-------------|
| 🔴 | urgent | Outages, security alerts, legal, payment failures, time-critical |
| 🟡 | needs-response | Business inquiries, questions, action items requiring a reply |
| 🔵 | informational | Receipts, confirmations, newsletters, automated notifications |
| âš« | spam | Marketing, promotions, unsolicited junk |
All configuration is via environment variables:
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| IMAP_HOST | ✅ | — | IMAP server hostname |
| IMAP_PORT | — | 993 | IMAP port (SSL) |
| IMAP_USER | ✅ | — | IMAP username / email address |
| IMAP_PASS | ✅ | — | IMAP password or app-specific password |
| EMAIL_TRIAGE_STATE | — | ./data/email-triage.json | Path to the JSON state file |
| OLLAMA_URL | — | http://127.0.0.1:11434 | Ollama API endpoint |
| OLLAMA_MODEL | — | qwen2.5:7b | Ollama model for classification |
EMAIL_TRIAGE_STATE (default: ./data/email-triage.json) — Persistent state file tracking classified emails and surfacing status# Scan inbox and classify new unread emails
python3 scripts/email/email-triage.py scan
# Scan with verbose output (shows each classification)
python3 scripts/email/email-triage.py scan --verbose
# Dry run — scan and classify but don't save state
python3 scripts/email/email-triage.py scan --dry-run
# Show unsurfaced important emails (urgent + needs-response)
python3 scripts/email/email-triage.py report
# Same as report but JSON output (for programmatic use)
python3 scripts/email/email-triage.py report --json
# Mark reported emails as surfaced (so they don't appear again)
python3 scripts/email/email-triage.py mark-surfaced
# Show triage statistics
python3 scripts/email/email-triage.py stats
report surfaces only unsurfaced urgent and needs-response emails, sorted by priority.mark-surfaced flags reported emails so they won't appear in future reports.scan periodically, then report --json to check for items needing attention.scan → report --json → act on results → mark-surfaced.Generated Mar 1, 2026
IT teams use the skill to automatically scan for urgent emails like server outage alerts, security breach notifications, or system failure reports from monitoring tools. This ensures critical issues are surfaced immediately for rapid response, reducing downtime and operational risks.
Support teams deploy the skill to classify incoming customer emails into urgent (e.g., payment failures), needs-response (e.g., inquiries), or informational categories. It helps prioritize responses, improving service level agreements and customer satisfaction by addressing high-priority issues first.
Legal departments utilize the skill to identify urgent emails related to regulatory deadlines, legal notices, or compliance violations. By surfacing these emails automatically, it ensures timely action to avoid penalties and maintain legal adherence in fast-paced environments.
Marketing teams apply the skill to filter out spam and categorize informational emails like newsletters or automated notifications from campaign tools. This allows them to focus on actionable feedback or urgent issues, optimizing campaign performance and resource allocation.
Small business owners use the skill to scan their general inbox for important emails such as urgent client requests or payment-related messages. It helps them stay organized without manual sorting, ensuring key communications are not missed in daily operations.
Offer the skill as part of a subscription-based service for email management, with tiered pricing based on features like AI classification or higher scan limits. Revenue is generated through monthly or annual fees from businesses seeking automated inbox triage solutions.
Provide consulting services to customize and integrate the skill into existing business workflows, such as setting up IMAP connections or optimizing heuristics for specific industries. Revenue comes from one-time project fees or ongoing support contracts.
Distribute the skill as a free open-source tool with basic heuristic classification, while offering premium features like advanced AI models or priority support for a fee. Revenue is generated through upsells to paid versions or enterprise licenses.
💬 Integration Tip
Run the scan command via a cron job for periodic email checks, and use report --json to programmatically fetch urgent emails for integration into dashboards or alerting systems.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.
Gmail API integration with managed OAuth. Read, send, and manage emails, threads, labels, and drafts. Use this skill when users want to interact with Gmail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Automatically logs into email accounts (Gmail, Outlook, QQ Mail, etc.) and generates daily email summaries. Use when the user wants to get a summary of their emails, check important messages, or create daily email digests.
Fetch content from Feishu (Lark) Wiki, Docs, Sheets, and Bitable. Automatically resolves Wiki URLs to real entities and converts content to Markdown.
Manage Feishu (Lark) calendars by listing, searching, checking schedules, syncing events, and marking tasks with automated date extraction.