Back to Library#02 / 30
Level 1 — Solopreneur Engine
Inbox Zero Agent
Setup Time: Under 60 min
Est. API Cost: ~$3–$8/mo
Client Price: $250–$500
1. The Problem
The average professional processes 50–80 emails per day manually — reading, categorising, deciding, drafting, and deleting. This consumes 90–120 minutes of high-quality cognitive time every single day. More critically, it consumes it in fragments — a constant context-switching tax that destroys the focused blocks where real work happens.
2. Integration & Webhook Setup
Follow the exact steps below to configure and deploy this automation inside your OpenClaw workspace.
- 1Create a new agent named `inbox-zero-agent`.
- 2Configure your email provider connection: Gmail uses OAuth2 (instructions in README), Outlook uses Microsoft Graph API. You will need read, label, draft, and delete scopes.
- 3Configure the System Prompt `VIP_SENDERS` list — add any email addresses or domains that should always be flagged as high priority regardless of content.
- 4Set your `REPLY_TONE` parameter: formal, professional, or casual — the agent will draft replies matching your configured style.
- 5On first run, review the drafted replies carefully and adjust the tone settings before enabling auto-categorisation on subsequent runs.
3. The Context Payload (context.json)
Save this file as: .openclaw/agents/inbox-zero-agent/context.json
context.json
context payload
{
"automation_id": "2",
"title": "Inbox Zero Agent",
"level": 1,
"tier": "Solopreneur Engine",
"setup_time": "Under 60 min",
"estimated_api_cost": "~$3–$8/mo",
"client_price_range": "$250–$500",
"agents": [
{
"role": "orchestrator",
"model": "claude-3-5-sonnet",
"temperature": 0.2,
"max_tokens": 4096
}
],
"memory": "session",
"output_format": "structured_json",
"human_review_gate": true,
"documentation_standard": "required"
}4. Execution Commands
Run these commands from your openclaw-workshop/ directory to validate, test, and schedule this automation. Commands are taken directly from The OpenClaw Income Engine, Appendix E.
terminal
execution commands
# ── STEP 1: Test with last 5 emails only (safe dry run) ──
$ openclaw run inbox-zero-agent --test --limit 5 --dry-run
$
# ── STEP 2: Review classification output before enabling actions ──
# Inspect the output JSON — confirm categories look correct.
# Adjust vip_senders in context.json if anything is miscategorised.
$
# ── STEP 3: Run live in classify-only mode (no drafts yet) ──
$ openclaw run inbox-zero-agent --mode classify-only
$
# ── STEP 4: Enable full mode with draft creation ──
$ openclaw run inbox-zero-agent
$
# ── STEP 5: Schedule for 23:00 nightly ──
$ openclaw schedule inbox-zero-agent --cron "0 23 * * *"
$
# ── TROUBLESHOOTING: Re-classify a specific email ──
$ openclaw run inbox-zero-agent --email-id <gmail_message_id> --verbose
$
# ── CLIENT DEPLOYMENT: Switch to Microsoft Graph provider ──
$ openclaw run inbox-zero-agent --context.email_provider="microsoft_graph"