Email remains one of the biggest time sinks for knowledge workers. Reading through unread messages, understanding context, and crafting appropriate replies can consume hours every day. Aura is my attempt to automate the most repetitive part of that workflow — generating draft replies for unread Outlook emails using AI.
The Problem
Most AI email tools require you to copy-paste content into a chat interface, losing thread context and sender metadata. I wanted something that:
- Connects directly to my Outlook inbox
- Reads unread emails with full thread context
- Generates draft replies I can review and send with one click
- Runs locally without sending email content to unnecessary third parties
Architecture
Aura is built in Python with three core components:
1. Outlook Integration
Using the Microsoft Graph API (or Outlook COM interface on Windows), Aura fetches unread emails from the inbox. Each email is parsed for sender, subject, body text, and conversation thread history — giving the LLM enough context to generate relevant replies.
2. LLM Draft Generation
The email content is passed to an LLM with a structured prompt that includes:
- The sender's name and relationship context (if available)
- The full email thread for conversational continuity
- Instructions for tone (professional, concise, action-oriented)
- Constraints to avoid hallucinating commitments or information not in the thread
3. Draft Saving
Generated replies are saved as Outlook drafts — not sent automatically. This human-in-the-loop design ensures I always review and edit before anything leaves my outbox.
# Simplified workflow
unread_emails = outlook_client.fetch_unread()
for email in unread_emails:
context = build_thread_context(email)
draft = llm.generate_reply(context, tone="professional")
outlook_client.save_draft(email, draft)
Design Decisions
- Drafts, not auto-send. AI-generated emails should never send without human review. Drafts give me full control.
- Thread-aware prompting. Including prior messages in the conversation dramatically improves reply quality compared to single-message prompts.
- Batch processing. Aura processes all unread emails in one run, typically scheduled via cron or Task Scheduler for morning inbox clearing.
Challenges
- Outlook API authentication. OAuth token refresh and permission scopes require careful setup, especially for organizational accounts with restricted API access.
- HTML email parsing. Many emails arrive as HTML with signatures, disclaimers, and quoted replies. Stripping noise while preserving context is an ongoing refinement.
- Tone calibration. Different senders warrant different tones — a reply to a manager differs from a reply to a vendor. Future versions will support per-contact tone profiles.
Results
Aura reduced my morning email triage from ~45 minutes to ~10 minutes. The AI drafts are not perfect — I edit about 60% of them before sending — but starting from a draft instead of a blank compose window saves significant cognitive effort.
What's Next
Planned improvements include priority-based processing (urgent emails first), calendar-aware scheduling suggestions in replies, and support for Gmail via IMAP/API integration.
Explore the source code on GitHub.