Tech AI LabsAI Growth Infrastructure for Business

How to Build an AI Email Assistant Using n8n

By the Tech AI Labs teamChecked 22 November 20265 min read
How to Build an AI Email Assistant Using n8n: a practical workflow overview

Short answer: In n8n, create a workflow with an email trigger, add AI steps that classify each message and draft a reply, route the draft for your review (or auto-file low-stakes categories), and activate the workflow. Your inbox starts triaging itself.

Most inboxes are a sorting problem: a minority of messages need your judgment, and the rest need classification, a routine reply or a filing decision. An n8n email assistant does the sorting continuously, so you open the inbox to decisions, not chaos. This build uses n8n's documented capabilities, checked in December 2026.

What the assistant does

The workflow in this guide handles five jobs:

  1. 1Watch for new emails.
  2. 2Classify each one: sales, support, invoice, newsletter, personal, spam-adjacent.
  3. 3Draft a reply for categories that need one.
  4. 4File the message with the right label or folder.
  5. 5Escalate anything urgent or ambiguous to you directly.

You stay in control: drafts wait for your review until you trust a category enough to automate it fully.

Step 1: Set up n8n and connect email

Step 2: The trigger

Create a workflow and add the email trigger node for your provider. Configure it to watch the inbox (or a specific label if you want to pilot on a subset). Each new email becomes an item flowing through the workflow with its subject, sender, body and metadata as fields.

Step 3: Classify with an AI step

Add a language model node (connect your OpenAI, Anthropic or Google API key) with a classification prompt:

"Read the email below. Reply with exactly one category: sales, support, invoice, newsletter, personal, or other. Then one short sentence explaining why. Email: [subject, sender, body]"

Parse the result into fields your workflow can branch on. Keep the categories few and distinct; five well-chosen buckets beat fifteen fuzzy ones. The practical prompt guide covers why constrained output formats make automations reliable.

Step 4: Branch and act per category

Use a Switch node to route each category:

The email assistant workflow: watch, classify, branch, draft, file
Guide diagram: The email assistant workflow: watch, classify, branch, draft, file

Step 5: Draft replies for review

For categories that deserve a reply, add a second AI step: "Draft a short, friendly reply to this email. Acknowledge the request, give the standard answer from the notes below, and promise a specific follow-up time. Sign off as [name]."

Send the draft to your review queue: a Slack channel, a draft folder, or a task list. This is the trust-building stage. After a few weeks of reviewing, you will know which categories draft well enough to send automatically, and those are almost always the routine acknowledgments, not the nuanced ones.

Step 6: Level up with an AI Agent node

The fixed workflow handles predictable mail. When messages need multi-step judgment, "look up this order, check the policy, then decide", swap the classification step for n8n's AI Agent node with tools: a CRM lookup, a knowledge base search, a calendar check. The agent reasons about which tools to call before drafting. n8n's documentation frames the choice clearly: fixed chains for predictable work, agents where the path varies per request.

Measuring whether it works

Track three numbers from day one: how many emails the workflow touches, how many drafts you send unedited, and how many misclassifications you catch. The first shows coverage, the second shows trust earned, and the third tells you where the prompt or the categories need work. A healthy assistant trends toward high coverage, rising unedited-send rates on routine categories, and near-zero misclassification on the categories you care about most.

Guardrails for an inbox assistant

Review queue and guardrails for AI-drafted replies
Guide diagram: Review queue and guardrails for AI-drafted replies

FAQ

Can n8n read my Gmail or Outlook inbox?

Yes. Both have dedicated n8n integrations with triggers for new mail and actions for labels, drafts and sends. Other providers work via IMAP.

Does the assistant send replies automatically?

Only if you configure it to. The safe default is AI-drafted replies in a review queue; promote a category to auto-send only after its drafts consistently pass your review.

What does it cost to run?

n8n self-hosted is free; n8n Cloud is subscription-based. AI steps consume your own model API credits, which for typical inbox volumes is modest.

How accurate is AI email classification?

With few, distinct categories and a clear prompt, very high. Accuracy problems usually trace back to overlapping category definitions, not the model.

Can it handle attachments?

Yes. n8n can download attachments and pass text content to AI steps, so invoices and documents can be summarized or extracted into sheets.

Sources

Key takeaways

Want an inbox that sorts itself? Book a free 30 minute call with Tech AI Labs and we will build the workflow with you.

FAQ

Quick answers

Can n8n read my Gmail or Outlook inbox?

Yes. Both have dedicated n8n integrations with triggers for new mail and actions for labels, drafts and sends. Other providers work via IMAP.

Does the assistant send replies automatically?

Only if you configure it to. The safe default is AI-drafted replies in a review queue; promote a category to auto-send only after its drafts consistently pass your review.

What does it cost to run?

n8n self-hosted is free; n8n Cloud is subscription-based. AI steps consume your own model API credits, which for typical inbox volumes is modest.

How accurate is AI email classification?

With few, distinct categories and a clear prompt, very high. Accuracy problems usually trace back to overlapping category definitions, not the model.

Can it handle attachments?

Yes. n8n can download attachments and pass text content to AI steps, so invoices and documents can be summarized or extracted into sheets.

IN THE DIRECTORY

See how this tool compares, what it costs and what it is best for.

Open the tool page →
How to Write Perfect AI Prompts: A Practical Guide: article illustration
TUTORIALS

How to Write Perfect AI Prompts: A Practical Guide

Read →
Free vs Paid ChatGPT: What You Get on Each Plan in 2026: article illustration
TUTORIALS

Free vs Paid ChatGPT: What You Get on Each Plan in 2026

Read →
Google AI Pro vs ChatGPT Plus for Daily Work: Plans, Prices and Fit: article illustration
TUTORIALS

Google AI Pro vs ChatGPT Plus for Daily Work: Plans, Prices and Fit

Read →

Keep exploring

Move from research to a useful workflow. Check the source, learn the steps, then discuss implementation.

Discuss your workflow