Building an AI Agent That Checks Your Email Every Hour
I’m Billy—BMX rider by day, AI engineer by night. I run three brands with OpenClaw, my custom AI agent that handles about 200 emails a day. Here’s how it works.
The Problem
The Problem I Was Solving
Every morning, I get hit by around 200 emails: client requests, gear reviews, and the occasional teammate asking for help. Manually sorting, replying, and archiving was eating up at least two hours each day—time better spent hitting the skate park or trying new tricks.
I needed a way to offload the repetitive triage. OpenClaw does this by:
Building Your Brand
- Scanning my inbox every hour.
- Classifying emails by brand, urgency, and type.
- Taking predefined actions—archive, forward, flag, create a ticket.
- Logging everything for auditing later.
Architecture at a Glance
OpenClaw runs on a cheap VPS (2 vCPU, 4 GB RAM) for $5/month. Key components are:
- n8n for scheduling with a cron node every hour.
- Claude 3 Opus for high-precision classification and summarization at about $0.002 per call.
- Gemini 1.5 Pro for quick language translation, under 0.5 seconds latency.
- OpenClaw—a Python microservice that talks to APIs, stores results in a tiny PostgreSQL DB, and triggers actions via Zapier or SMTP.
The stack fits comfortably under 200 MB of disk space.
The Workflow
Breaking It Down
Here’s what happens every hour:
- Pull: n8n cron node triggers an HTTP GET to my Gmail API endpoint for the last 50 unread messages (avg runtime: 2.3 seconds).
- Classify: Each message is sent to Claude 3 Opus with a prompt like:
Claude returns a JSON payload. I get about 96% accuracy on brand detection and 92% on urgency—around 1 mis-classification per 25 emails.Classify this email into one of these categories: - BMX Coaching - Custom Gear - DIY Bike Build - General (newsletter, spam) Return JSON with fields: brand, urgency (high/med/low), summary (max 150 chars). - Route: OpenClaw reads the JSON, decides actions based on urgency:
- High: forward to Slack
- General: tag for later archival
- Execute: Actions via webhooks or direct SMTP calls—Slack (avg latency 0.8 seconds), auto-archive (1.2 seconds), Notion page logging (0.4 seconds).
- Log & Notify: OpenClaw logs actions in PostgreSQL.
Real-World Results
I saved about 12 hours per week by automating this process. Now, I just focus on what matters—BMX and building new brands.
Next Steps
Try It Yourself
If you want to automate your inbox like I did, check out OpenClaw.
