Lesson 3 of 4
Setting Up Triage Rules
Estimated time: 7 minutes
Setting Up Triage Rules
Now that OpenClaw can read your email, you'll set up the AI triage system. This is where the magic happens — OpenClaw categorizes every unread email and sends you a clean digest.
How Triage Works
OpenClaw reads your unread emails, and for each one, the AI decides:
- Category — Urgent, Needs Response, FYI, or Skip
- One-line summary — What the email is about
- Suggested action — Reply, schedule, delegate, or archive
The result is a single digest message in your chat app that you can scan in under 2 minutes.
Create the triage cron job
Set up a scheduled job that triages your inbox every morning:
openclaw cron add \
--name "Email Triage" \
--cron "0 7 * * *" \
--tz "America/New_York" \
--session isolated \
--message "Read my unread emails from the last 24 hours. For each email:
1. Categorize it:
- 🔴 URGENT: Time-sensitive, needs action today (from my boss, clients, deadlines)
- 🟡 RESPOND: Needs a reply but not urgent (colleague questions, scheduling)
- 🔵 FYI: Informational, no action needed (reports, updates, newsletters I read)
- ⚪ SKIP: Noise (marketing, automated notifications, spam that got through)
2. Write a one-line summary for each email
3. Format as a digest with sections per category. Show sender name and subject.
Only show URGENT and RESPOND in detail. Summarize FYI as a count with top 3.
Just show the count for SKIP.
4. At the end, suggest which emails I should reply to first.
Keep it concise — I should be able to read this in under 2 minutes." \
--announce \
--channel telegram \
--to "CHAT_ID"
Replace America/New_York with your timezone and CHAT_ID with your chat ID.
Test the triage
Run it immediately to see your first digest:
openclaw cron run <job-id>You should receive a message like this:
📧 Email Triage — Mon, Jan 13
🔴 URGENT (2)
• Jane Smith — "Q1 Budget Review ASAP" — needs approval by EOD
• AWS — "Billing alert: usage spike" — 3x normal spend detected
🟡 RESPOND (4)
• Mike Chen — "Lunch Thursday?" — scheduling request
• Sarah K — "Design feedback needed" — wants input on mockups
• HR Team — "Benefits enrollment reminder" — deadline Friday
• Dev Team — "PR #847 ready for review" — code review request
🔵 FYI (12)
Top: Product launch update, Weekly metrics report, Team standup notes
+ 9 more newsletters and notifications
⚪ SKIP (23) — marketing emails, automated alerts
💡 Reply first: Jane's budget review (deadline today),
then Sarah's design feedback (quick win).
Customize the categories
The default four categories work for most people, but you can customize them.
Prioritize specific senders by adding rules to your prompt:
Sender priority rules:
- Always mark emails from @company.com domain as at least RESPOND
- Emails from my-boss@company.com are always URGENT
- Newsletters from specific-newsletter.com are FYI, not SKIP
- Anything from noreply@ is SKIP unless it contains "payment" or "security"
Set up real-time alerts (optional)
For truly urgent emails, don't wait for the morning digest. Add a separate real-time monitor:
openclaw cron add \
--name "Urgent Email Alert" \
--cron "*/15 * * * *" \
--tz "America/New_York" \
--session isolated \
--message "Check for any unread emails received in the last 15 minutes.
Only alert me if there are emails that are genuinely URGENT:
- From my direct manager or C-level executives
- Contains words like 'ASAP', 'urgent', 'emergency', 'deadline today'
- Payment or security alerts from financial institutions
If nothing is urgent, respond with just 'No urgent emails.'
Do NOT alert me for routine messages." \
--announce \
--channel telegram \
--to "CHAT_ID"
Don't over-alert
The key to real-time alerts is being very strict about what counts as urgent. If you get alerted for non-urgent emails, you'll learn to ignore the alerts — defeating the purpose.
Fine-tune the output format
Add these constraints to your triage prompt:
Keep the entire digest under 200 words.
No summaries for SKIP category — just the count.
Maximum 5 emails shown in detail.
For long email threads, ask the AI to summarize the thread:
For email threads with 3+ messages, summarize the entire thread
as one item. Show the thread length and the latest action needed.
Example: "Budget Thread (7 messages) — Jane asked for your approval"
If your email skill supports it, include deep links:
For each email, include a direct link to open it in Gmail/Outlook.
Format: [Open →](link)
If you have multiple email accounts:
Separate the digest into two sections:
1. WORK — emails from my company domain
2. PERSONAL — everything else
Apply triage rules to both but keep them visually separate.
Managing Your Triage
openclaw cron listopenclaw cron edit <job-id> --cron "0 7,12 * * 1-5"openclaw cron edit <job-id> --enabled falseWhy should real-time urgent email alerts have strict criteria?