DEV Community

AutoMate AI
AutoMate AI

Posted on

Building an AI Email Assistant That Actually Works

I get 150+ emails per day. Reading and responding to all of them manually would take 4-5 hours.

Now I spend 45 minutes. My AI assistant handles the rest.

This isn't "mark as read and archive." It's actual responses, actual processing, actual work. Here's how I built it.

What the Assistant Does

1. Triage: Categorizes every email (urgent, can wait, FYI, spam)

2. Draft responses: For common types, writes the first draft

3. Extract action items: Pulls out tasks and adds to my todo list

4. Schedule follow-ups: If someone promised something, tracks it

5. Summarize threads: Long email chains become one paragraph

The Architecture

Incoming Email
      ↓
  [Webhook: new email]
      ↓
  [Claude: analyze & categorize]
      ↓
  [Decision: needs response?]
      ↓
  YES: [Claude: draft response] → My review queue
  NO: [Archive/Label/Forward]
      ↓
  [Extract: action items, deadlines, promises]
      ↓
  [Update: todo list, calendar, CRM]
Enter fullscreen mode Exit fullscreen mode

Step 1: Email Webhook

Gmail/Outlook watch for new emails → trigger n8n workflow.

// n8n HTTP webhook receives new email data
{
    "from": "client@company.com",
    "subject": "Re: Project timeline question",
    "body": "Hi, just following up on our call...",
    "thread_id": "abc123",
    "timestamp": "2024-01-15T10:30:00Z"
}
Enter fullscreen mode Exit fullscreen mode

Step 2: Analysis Prompt

Analyze this email and respond with JSON:

EMAIL:
From: {from}
Subject: {subject}
Body: {body}

RESPOND WITH:
{
    "category": "urgent|normal|fyi|spam|personal",
    "sentiment": "positive|neutral|negative|angry",
    "needs_response": true|false,
    "response_deadline": "YYYY-MM-DD or null",
    "action_items": ["list of tasks mentioned"],
    "key_info": "one sentence summary",
    "suggested_response_type": "quick_ack|detailed|decline|forward|none"
}

CATEGORY RULES:
- urgent: deadline mentioned, angry tone, VIP sender
- normal: requires response but not time-sensitive
- fyi: newsletters, updates, no action needed
- spam: promotional, unsolicited
- personal: friends/family (should handle manually)
Enter fullscreen mode Exit fullscreen mode

Claude returns structured analysis in ~500ms.

Step 3: Response Generation

For emails needing response, separate prompt:

Write a response to this email.

CONTEXT:
- My name: [Your name]
- My role: [Your role]
- My tone: Professional but warm, concise
- Email history: [Previous messages in thread if available]

EMAIL TO RESPOND TO:
{email_content}

ANALYSIS:
{analysis_from_step_2}

RULES:
- Maximum 150 words unless complex topic
- Address their main question/concern first
- End with clear next step
- Don't be overly formal or use clichés
- Match their level of formality
- If declining, be direct but kind

ADDITIONAL CONTEXT:
{any relevant info from CRM, calendar, previous interactions}
Enter fullscreen mode Exit fullscreen mode

Step 4: The Review Queue

I don't auto-send responses. Too risky.

Drafts go to a review queue (Notion database or simple email drafts folder):

From Subject Draft Category Actions
client@... Timeline? [preview] normal Edit / Send / Discard

My morning routine:

  1. Open queue
  2. Review drafts (5-10 seconds each)
  3. Edit if needed
  4. Send

30 drafts × 10 seconds = 5 minutes instead of 2 hours.

Step 5: Action Item Extraction

Extract action items from this email thread:

{full_email_thread}

RETURN FORMAT:
{
    "my_todos": [
        {"task": "Send proposal", "deadline": "2024-01-20", "context": "for Q1 project"}
    ],
    "their_promises": [
        {"who": "John", "promised": "Send budget numbers", "by": "Friday"}
    ],
    "meetings_to_schedule": [
        {"with": "John", "purpose": "Review proposal", "suggested_times": "next week"}
    ]
}
Enter fullscreen mode Exit fullscreen mode

Action items go to Todoist. Promises go to a follow-up tracker.

Step 6: Follow-Up Tracking

If someone promises something, I track it:

// n8n stores in Airtable
{
    "who": "john@company.com",
    "promised": "Send budget numbers",
    "promised_on": "2024-01-15",
    "due_by": "2024-01-19",
    "status": "pending",
    "thread_id": "abc123"
}

// If due date passes without delivery:
// Automatic draft: "Hey John, following up on the budget numbers..."
Enter fullscreen mode Exit fullscreen mode

No more things falling through cracks.

The Prompts That Matter

For newsletters/updates (no response needed):

Summarize this newsletter in 2-3 bullet points.
Only include actionable or genuinely interesting information.
If nothing notable, just say "Nothing actionable."
Enter fullscreen mode Exit fullscreen mode

For meeting requests:

Extract meeting details:
- Who wants to meet
- Proposed times
- Topic/purpose
- My calendar: [today's schedule]

If I'm free and this is a priority, draft acceptance.
If busy, suggest 2-3 alternative times this week.
If unclear purpose, ask for agenda first.
Enter fullscreen mode Exit fullscreen mode

For sales/promotional emails:

Is this relevant to my business needs?
Current priorities: [list]

If relevant: summarize and label for later review.
If not: label as promotional and archive.
Enter fullscreen mode Exit fullscreen mode

Results After 3 Months

Time spent on email:

  • Before: 4-5 hours/day
  • After: 45 minutes/day

Response time:

  • Before: Average 4 hours
  • After: Average 45 minutes (important emails get faster attention)

Things missed:

  • Before: 2-3 dropped balls per week
  • After: Nearly zero (follow-up tracking catches everything)

Stress level:

  • Before: Inbox anxiety constant
  • After: Email is a controlled process, not chaos

Cost

Tool Cost
Claude API ~$30/month (processing ~5000 emails)
n8n $24/month (cloud) or $0 (self-hosted)
Airtable $0 (free tier)
Total ~$54/month

Compare to a virtual assistant at $500+/month.

What It Can't Do

  • Nuanced relationship emails (still write those myself)
  • Complex negotiations
  • Anything emotionally sensitive
  • Decisions that need context I haven't provided

For these, it just flags for manual handling.

Getting Started

Week 1: Set up email forwarding/webhook. Get emails into n8n.

Week 2: Build categorization. Just sorting saves time.

Week 3: Add response drafting for your top 3 email types.

Week 4: Add action item extraction and follow-up tracking.

Start simple. Add sophistication based on what's actually eating your time.


Complete email assistant setup — every prompt, every workflow, every integration — in AI Automation Blueprint 2026. $29 for the full system.

Top comments (0)