The inbox problem nobody talks about
Most Australian small business owners I speak to don't complain about getting too much email. They complain about the weight of it. The 6 AM check before a job site. The Sunday evening scroll that ruins dinner. The client enquiry buried under seventeen newsletters and three "final reminders" from software they stopped using two years ago. The mental load of deciding, over and over, what's urgent and what's noise.
You don't need another app that promises "inbox zero." You need something that understands your business well enough to say: "This one matters. This one can wait. And this one — I'll draft a response you just need to tweak."
That's what an AI email assistant does. Not a replacement for your judgment, but a filter and a first draft. Like having a very capable admin who reads every email before you do, sorts them into piles, and writes the easy replies — but always asks before sending anything.
"AI is not magic. It's a very fast, very patient, very literal assistant that has read most of the internet and can pattern-match against what you give it. The trick is knowing what to ask and how to keep it honest."
— The working definition I use with clients
What an AI email assistant actually does
Before we talk about building anything, let's be specific about what "AI email assistant" means in practice. It is not a sentient being managing your correspondence. It is a pipeline of three connected steps, each of which you control:
1. Prioritise: The AI reads incoming messages and sorts them by urgency and relevance. Urgent client enquiry? Flagged. Newsletter from a supplier? Filed for later. Automated invoice receipt? Logged without bothering you. The rules are yours — the AI just applies them consistently at 6 AM when you're still asleep.
2. Draft: For the emails that need a response, the AI writes a first draft in your voice. It references previous correspondence, includes the right details, and gets the tone roughly right. You review, edit, and send. The time savings aren't in the writing — they're in the starting. A blank page is exhausting. A decent draft is just editing.
3. Route: Some emails aren't for you at all. A booking enquiry goes to scheduling. A supplier question goes to procurement. A complaint goes straight to the principal with a summary. The AI reads, classifies, and forwards — or flags for human review when it's unsure.
Think of it like a triage nurse at a busy GP clinic. They don't replace the doctor. They make sure the doctor sees the right patients in the right order, and they've already taken the temperature and asked the obvious questions.
How it works under the hood
The architecture is simpler than most SaaS products would have you believe. You need four pieces:
- An email connection — IMAP to read incoming mail, SMTP to send replies. Or Gmail/Microsoft APIs if you prefer.
- A classifier — something that looks at subject, sender, and body, and decides: urgent / routine / marketing / needs reply / forward to someone else.
- A drafter — a language model that writes responses based on your instructions and previous email threads.
- A review gate — a human checkpoint before anything gets sent. Non-negotiable.
These four pieces can be glued together with a short Python script, a no-code automation platform like n8n or Make, or a dedicated tool. In this guide I'll show you the Python approach because it's the most flexible and the least expensive long-term. But the principles apply regardless of what tools you use.
What you need to get started
You don't need much. Here's the honest inventory:
- A computer that stays on. A Raspberry Pi works. An old desktop in the corner works. A $15/month cloud server works. It just needs to check email regularly — every 5 to 15 minutes is usually enough.
- Python installed. Version 3.9 or newer. If you followed the Ollama guide, you already have this.
- An AI model. Cloud (OpenAI, Anthropic, Google) or local (Ollama). We'll cover the trade-offs shortly.
- App-specific passwords. Most email providers won't let scripts log in with your normal password. You'll need to generate an app password in Gmail, Outlook, or whatever you use.
- A tolerance for imperfection. The first draft will be wrong sometimes. The classifier will miscategorise occasionally. If you need 100% accuracy from day one, this isn't for you. If you need 80% of the grunt work handled automatically, keep reading.
Real-world example
A mortgage broker in Brisbane receives roughly 60 emails per day: client documents, lender notifications, referral partner introductions, compliance updates, and spam. Before the AI assistant, she spent 90 minutes every morning sorting and replying. After:
- Urgent lender deadlines are flagged within 5 minutes of arrival
- Document chase emails are drafted and queued for her review
- Referral introductions get a warm, personalised reply she just approves
- Newsletters and compliance circulars are summarised in a single daily digest
Time saved: about 7 hours per week. Her reaction: "I used to dread opening my laptop. Now I know the important stuff is already at the top."
Step 1: Connect to your email
We'll use Python's built-in imaplib and smtplib because they work with almost every email provider and require zero extra dependencies beyond the standard library. If you're on Gmail, you'll need an app password. Same for Outlook. Your IT person or a five-minute Google search will show you how.
Here's a minimal script that connects to your inbox and reads the unread messages:
import imaplib
import email
from email.header import decode_header
IMAP_SERVER = "imap.gmail.com"
SMTP_SERVER = "smtp.gmail.com"
EMAIL_USER = "[email protected]"
EMAIL_PASS = "your-app-password"
with imaplib.IMAP4_SSL(IMAP_SERVER) as mail:
mail.login(EMAIL_USER, EMAIL_PASS)
mail.select("inbox")
_, data = mail.search(None, "UNSEEN")
message_ids = data[0].split()
print(f"Found {len(message_ids)} unread messages")
for msg_id in message_ids[:5]:
_, msg_data = mail.fetch(msg_id, "(RFC822)")
raw = msg_data[0][1]
msg = email.message_from_bytes(raw)
subject = decode_header(msg["Subject"])[0][0]
if isinstance(subject, bytes):
subject = subject.decode()
sender = msg.get("From", "unknown")
print(f"From: {sender} | Subject: {subject}")
Save that as check_email.py and run it:
python3 check_email.py
If you see a list of unread emails, you're connected. If you get authentication errors, double-check that you're using an app password, not your normal login password. Gmail in particular will reject normal passwords from scripts.
What this script doesn't do yet is read the body of the email properly, especially for HTML emails. We'll get to that in the next step. For now, celebrate the connection. Most people who abandon this project do so at the authentication step. You've cleared the first hurdle.
Step 2: Build the filtering layer
Now we add the brain. The simplest version uses keyword matching and sender lists. The smarter version sends the subject and a snippet of the body to an AI model and asks it to classify.
Start with the simple version. It's faster, cheaper, and surprisingly effective:
URGENT_SENDERS = ["ato.gov.au", "lender.com", "bigclient.com"]
MARKETING_KEYWORDS = ["unsubscribe", "newsletter", "promotion", "sale"]
DOCUMENT_KEYWORDS = ["payslip", "bank statement", "tax return", "identification"]
def classify_email(subject, sender, body):
subj_lower = subject.lower()
body_lower = body.lower()
sender_lower = sender.lower()
if any(s in sender_lower for s in URGENT_SENDERS):
return "urgent"
if any(k in subj_lower or k in body_lower for k in DOCUMENT_KEYWORDS):
return "needs_documents"
if any(k in subj_lower or k in body_lower for k in MARKETING_KEYWORDS):
return "marketing"
if "quote" in subj_lower or "estimate" in subj_lower:
return "quote_request"
return "general"
This is crude but effective. A mortgage broker can add lender domain names to URGENT_SENDERS. A tradesperson can add "quote" and "estimate" triggers. An accountant can flag anything mentioning "tax return" or " BAS."
The AI-enhanced version sends the email to a model and asks for structured output:
def ai_classify(subject, body, model_client):
prompt = f"""Classify this email into exactly one category:
urgent, quote_request, needs_documents, marketing, general.
Subject: {subject}
Body: {body[:800]}
Respond with only the category name."""
return model_client.complete(prompt).strip()
The AI version catches things keyword matching misses — like a client saying "urgent" in the body but not the subject, or a subtle referral introduction that doesn't contain the word "quote." The cost is about 0.1–0.3 cents per email on cloud APIs, or effectively zero on a local model. For 60 emails a day, that's $2–$6 per month for the cloud version, or the cost of electricity for the local version.
Step 3: Draft responses with AI
This is where the time savings compound. For emails that need a reply, we ask the model to write a draft based on the thread history and our instructions.
Here's a practical prompt template that works well for most small businesses:
def draft_reply(subject, body, sender, business_context):
prompt = f"""You are writing emails on behalf of {business_context['name']}, a {business_context['industry']} in {business_context['location']}.
Tone: professional but warm. Not overly formal. Use Australian English spelling.
Write a reply to this email. If you need more information to answer properly, ask a brief follow-up question. Keep it under 150 words unless the topic is complex.
Original email from {sender}:
Subject: {subject}
Body: {body[:1200]}
Draft reply:"""
return model_client.complete(prompt)
For a tradesperson, the business_context might be:
business_context = {
"name": "Northside Plumbing",
"industry": "plumbing and gasfitting business",
"location": "Brisbane",
"special_instructions": "We typically book 2–3 days out. Always mention our license number if quoting."
}
The model produces a draft like:
Hi Sarah, thanks for getting in touch about the leaking mixer tap at your place in Paddington. We can definitely take a look. Our next available spot is Thursday afternoon or Friday morning. A standard tap repair is usually $180–$220 including parts and labour. If it's a full replacement, I'll quote once I see it. Our license number is QBCC 123456. Let me know if either time works and I'll lock it in. — Mike
That's not ready to send. The license number is real, the pricing is in the right ballpark, but Mike still needs to check his actual availability and confirm the postcode. The draft saves him five minutes of staring at a blank reply box.
With a local model via Ollama, the call looks like this:
import ollama
def local_draft(prompt):
response = ollama.chat(model="llama3.1", messages=[
{"role": "user", "content": prompt}
])
return response["message"]["content"]
With a cloud API like OpenAI:
import openai
def cloud_draft(prompt):
response = openai.ChatCompletion.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": prompt}],
temperature=0.7,
max_tokens=400
)
return response.choices[0].message.content
Both work. The local version keeps everything private. The cloud version is slightly more reliable and doesn't require a computer to be running at home. Choose based on your privacy tolerance and technical patience.
Step 4: Add human review before sending
This is the most important section in the entire guide. Under no circumstances should you let an AI send emails unsupervised. I've seen demos where the AI "auto-replies" to everything. They're impressive until the first time it sends a draft quote to the wrong client, or uses last year's pricing, or addresses someone by their ex-partner's name because it misread the thread.
The safe pattern is: draft, queue, review, approve, send. Here's what that looks like in practice.
Instead of sending directly, save drafts to a review queue:
import json, os
from datetime import datetime
QUEUE_FILE = "draft_queue.json"
def queue_draft(draft, original_subject, recipient):
entry = {
"created": datetime.now().isoformat(),
"recipient": recipient,
"original_subject": original_subject,
"draft": draft,
"status": "pending_review"
}
queue = []
if os.path.exists(QUEUE_FILE):
with open(QUEUE_FILE) as f:
queue = json.load(f)
queue.append(entry)
with open(QUEUE_FILE, "w") as f:
json.dump(queue, f, indent=2)
Then build a tiny review interface — even a text file you open once a day — where you see the draft, edit it if needed, and click "send" or "discard." A simple CLI review script works fine:
def review_queue():
with open(QUEUE_FILE) as f:
queue = json.load(f)
pending = [q for q in queue if q["status"] == "pending_review"]
for item in pending:
print(f"\nTo: {item['recipient']}")
print(f"Re: {item['original_subject']}")
print(f"Draft: {item['draft']}")
action = input("[s]end / [e]dit / [d]iscard: ").strip().lower()
if action == "s":
send_email(item["recipient"], item["original_subject"], item["draft"])
item["status"] = "sent"
elif action == "d":
item["status"] = "discarded"
# save back...
This feels low-tech because it is low-tech. That's the point. A review queue is a safety rail, not a product feature. It takes 10 minutes to build and prevents $10,000 worth of reputation damage.
For teams, replace the JSON file with a shared Trello board, a Slack channel, or a simple web page. The principle is identical: human eyes on every outbound message.
Local AI vs cloud AI for email
Let's talk through the trade-off properly, because email is where privacy matters most.
Cloud AI (OpenAI, Anthropic, Google):
- More capable models, better at nuance and tone
- No hardware required beyond a cheap server
- Cost: roughly $0.001–$0.003 per email drafted or classified
- Your email content leaves your infrastructure and goes to their servers
- Requires an internet connection for every action
Local AI (Ollama, local Llama/Qwen):
- Data never leaves your machine. Client emails stay client emails.
- No ongoing API costs
- Works offline
- Smaller models are less nuanced. A 7B model will occasionally miss tone or produce awkward phrasing
- Requires a computer with 8–16GB RAM to run comfortably
My recommendation for most Australian SMBs: start with a local model for classification (it's fast and doesn't need nuance) and use a cloud model for drafting only when the local version produces clunky results. Or use a local 13B model for everything if you have the hardware. The cost of a decent secondhand desktop is paid back in three months of avoided API fees.
What goes wrong — reality check
I've built enough of these systems to know where they break. Here is the honest inventory:
Hallucinated facts: The AI will confidently invent details. It might say "we spoke last Tuesday" when you didn't. It might reference a quote number that doesn't exist. It might use last year's pricing because that's what it saw in training data. Every draft must be fact-checked.
Wrong recipient: Thread parsing is harder than it looks. The AI might reply to the CC'd person instead of the original sender, or include someone in the thread who shouldn't be there. Always verify the To: field.
Tone drift: Over time, the AI's definition of "professional but warm" might creep toward overly familiar or weirdly stiff. Review a sample of drafts weekly to catch drift before clients notice.
Security: Storing app passwords in plain text scripts is fine for personal experimentation and terrible for production. Use environment variables at minimum. For a real business system, use a secrets manager or encrypted key store.
The "helpful" trap: The AI wants to be helpful. It will apologise for things you didn't do wrong, offer discounts you didn't authorise, and promise timelines you can't meet. Prompt engineering matters here. Explicitly instruct the model: "Do not offer discounts. Do not apologise for delays unless confirmed. Do not promise specific dates."
"The demo is the easy part. The hard part is making it survive contact with real people, real data, and real deadlines for six months without breaking someone's trust."
What this actually costs
Let's be specific about money, because "AI" sounds expensive and it usually isn't.
Minimal viable version:
- Cloud API for classification + drafting: $2–$6 per month for ~60 emails/day
- A $15/month cloud server (or a Raspberry Pi you already own)
- Your time: 4–6 hours to build and test the first version
- Total first-month cost: $20–$50 plus an afternoon
Local-only version:
- Secondhand desktop with 16GB RAM: $400–$800 one-time
- Electricity: roughly $2–$4 per month
- Your time: 6–8 hours (slightly more because local setup has more moving parts)
- Total first-month cost: $400–$800, then ~$3/month
- Break-even vs cloud: roughly 18–36 months depending on volume
What you buy vs what you build:
There are SaaS products that do AI email assistance — Superhuman, Shortwave, various CRM-integrated tools. They cost $20–$50 per user per month. They're polished and supported. They're also one-size-fits-all, and they send your data to their servers. Building your own is cheaper long-term and infinitely more private, but requires patience. There's no wrong choice, only a mismatch between your expectations and what you picked.
What it actually takes
Here is the honest time breakdown for a working system:
- Day 1 (2–3 hours): Connect to email, build the classifier, test with 20 real messages. Don't write replies yet. Just classify and see how accurate it is.
- Day 2 (2–3 hours): Add drafting. Test with 10 real emails. Edit the prompts until the tone feels like you. This is iterative. Expect 5–10 versions.
- Day 3 (1–2 hours): Build the review queue. Test the full pipeline: receive, classify, draft, review, send. Fix the bugs. There will be bugs.
- Week 2 (1 hour): Run it in parallel with your normal process. Compare the AI drafts to what you would have written. Adjust prompts based on mismatches.
- Ongoing (30 min/week): Review a sample of sent emails. Watch for tone drift, factual errors, and edge cases. Update sender lists and keyword rules as your business changes.
The total investment is roughly one work week spread across two weeks, plus half an hour per week ongoing. The return, for a business receiving 40–80 emails per day, is 5–10 hours per week reclaimed. That's 250–500 hours per year. Even at a conservative $50/hour valuation, that's $12,500–$25,000 worth of attention redirected to work that actually grows the business.
Building this and hitting walls?
I've built AI email workflows for mortgage brokers, tradespeople, accountants, and professional services firms. If you're stuck on the integration, the prompt engineering, or making it feel trustworthy — get in touch.
What to build next
Once your email assistant is running, the natural extensions are:
- Calendar integration: Automatically suggest meeting times in draft replies based on your actual availability.
- CRM logging: Every email interaction gets summarised and appended to the client record automatically.
- Follow-up reminders: If a client doesn't reply to a quote within 3 days, the AI drafts a polite chase email and queues it for your review.
- Sentiment tracking: Flag emails where the client seems frustrated, confused, or unusually happy, so you can prioritise human contact.
Each of these is a few hours of work on top of the base system. None of them require advanced machine learning knowledge — just the same pattern of connect, classify, draft, review.
Start small. One pipeline. One type of email. Get it working, get it trusted, then expand. The businesses that succeed with AI are the ones that treat it as a compounding advantage, not a magic wand.