How to Automate Your Gmail with AI Using n8n (Draft Replies, Not Chaos)
You can automate the tedious parts of email without letting AI send anything on its own. Using n8n, a free automation tool, a new email triggers a workflow that reads it, asks an AI to classify it and write a draft reply, then labels the message and saves the reply as a draft for you to approve. Start with just auto-labelling, add draft replies next, and keep a human in the loop on everything that sends. The goal is to automate the triage, never the judgment.
Akhilesh Angadi
Founder of NeuralSutras · writes about practical AI & software · 5 October 2026
TL;DR: You can automate the tedious parts of email without letting AI send anything on its own. Using n8n, a free automation tool, a new email triggers a workflow that reads it, asks an AI to classify it and write a draft reply, then labels the message and saves the reply as a draft for you to approve. Start with just auto-labelling, add draft replies next, and keep a human in the loop on everything that sends. The goal is to automate the triage, never the judgment.
Your inbox is a to-do list that other people write for you. The fix is not another app that promises "inbox zero," it is automating the boring, repeatable parts: sorting what came in, and getting a first-draft reply ready so you are editing instead of starting from a blank box.
The important rule up front: we are not going to let AI send email on its own. Everything it writes lands as a draft you approve. Automate the triage, keep the judgment.
Here is how to build it with n8n, a free, open-source automation tool.
The three automations that matter, in order
You do not need a sprawling workflow. Three automations cover about 80% of the value, and you should add them in this order:
- Auto-label incoming email. The AI reads each new message and tags it: needs reply, FYI, invoice, sales, spam. Your inbox sorts itself, and you see the shape of the day at a glance. This alone is worth the setup.
- Draft replies for approval. For anything that needs a response, the AI writes a draft and saves it to the thread. You open it, edit, and send. The blank box is gone.
- A daily digest. Once a day, a short summary of what came in and what is waiting. Useful, but add it only after the first two earn their keep.
Build number one first, live with it for a few days, then add the next.
How the workflow fits together
In n8n, a workflow is a chain of nodes, each doing one thing and passing its result to the next. Ours is short:
- Gmail Trigger fires when a new email arrives. Filter it to unread so each message is handled once.
- Gmail (Get Message) pulls the full text of the email so the AI has the whole context, not just the subject line.
- AI node (your choice of model) reads the email and returns structured output: a category, whether a reply is needed, a suggested label, and a draft reply.
- IF node checks the result. Needs a reply? Continue. FYI or spam? Just label and stop.
- Gmail (Apply Label) tags the message.
- Gmail (Create Draft) saves the AI's reply to the thread, unsent.
That is the whole machine. Six nodes, and a human at the end.
Build it step by step
- Connect Gmail. In n8n, create Gmail OAuth2 credentials and link your Google account. On self-hosted n8n you also enable the Gmail API in Google Cloud and paste n8n's redirect URL.
- Add the Gmail Trigger. Set it to fire on a new message, filtered to unread.
- Add Gmail Get Message. Fetch the full body and thread.
- Add the AI node and give it the prompt below.
- Add a Structured Output Parser so the AI returns clean, machine-readable fields.
- Add an IF node on the "needs reply" field.
- Add Gmail Apply Label and Gmail Create Draft on the reply branch; just the label on the other.
- Mark as processed (or rely on the unread filter) so nothing is handled twice.
The prompt that does the work
The AI node is the brain. Ask it for structured JSON so the rest of the workflow can act on it:
Read this email and return JSON with:
category (support | sales | invoice | personal | fyi | spam)
needs_reply (true | false)
label (a short Gmail label name)
draft_reply (a polite, concise reply, or "" if no reply needed)
If the email is spam or purely FYI, set needs_reply to false.
Match my usual tone: warm, direct, no filler.
Tune the categories and tone to your actual inbox. The clearer the instruction, the less editing you do later.
Keep a human in the loop
This is the part people get wrong, so it is worth being firm about. The AI drafts; you send. Never wire the workflow to send automatically, however good the drafts get. A single confidently wrong email to a client is far more expensive than the few seconds it takes you to glance at a draft and hit send.
Two more cautions:
- Privacy. Every email the workflow processes goes to whatever AI model you connect. Do not route confidential or regulated mail through a public model. For sensitive inboxes, use a local model, the same logic as in what you should never share with public AI.
- Start narrow. Run it on one label or one sender first. Watch it for a week before you point it at the whole inbox.
Practical checklist
- Install or sign in to n8n (the free tier is enough to start)
- Connect Gmail with OAuth2 credentials
- Build automation one: trigger, get message, AI classify, apply label
- Live with auto-labelling for a few days
- Add the draft-reply branch with an IF node and Create Draft
- Confirm nothing ever sends automatically
- Keep confidential mail off public AI models
- Add the daily digest last, only if you still want it
Key takeaways
- Automate the triage, never the sending.
- Three automations cover most of the value: auto-label, draft replies, daily digest.
- The workflow is six nodes: trigger, read, AI, IF, label, draft.
- Ask the AI for structured JSON so the workflow can act on it.
- Keep a human approving every reply before it goes out.
- Route confidential email through a local model, not a public one.
- Start on one label or sender, then widen.
The bottom line
Email automation gets a bad name because people reach straight for the scary version: an AI that reads and replies on its own. That is not the win. The win is quieter. Your inbox sorts itself, and every reply that needs writing is already drafted when you open it, so your job shrinks from "process a hundred emails" to "approve or edit twenty drafts."
Build the labelling piece this week. It is the smallest step and the one you will feel immediately. Add drafts once you trust the labels. Keep your hand on the send button the whole way, and you get most of the time back without giving up any of the control.
Frequently Asked Questions
Is n8n free? Yes, n8n is open-source and has a free tier, and you can self-host it for free. You will need an AI model connection, where the free tiers are often enough to start.
Will this send emails without me? Only if you build it to, and you should not. This workflow saves drafts for your approval. Keep sending as a human step.
Do I need to know how to code? No. n8n is visual: you connect nodes and fill in fields. The one technical part is connecting Gmail with OAuth, which is a guided, one-time setup.
Is it safe to connect my email to AI? The email content goes to the AI model you choose, so treat it like any public AI: fine for routine mail, not for confidential or regulated messages. Use a local model for sensitive inboxes.
What if the AI mislabels or writes a bad draft? You catch it, because nothing sends on its own. Over the first week you will refine the prompt and categories until the drafts need only light edits.
Further Reading
- Cut Your Email and Meeting Time with AI: the manual routines this workflow automates
- AI Agents Explained: where this kind of automation is heading
- Is ChatGPT Safe to Use?: what not to route through a public model
What's Next
- Build Your First AI Agent in n8n (coming soon): go from this workflow to a full agent
- How to Run AI Locally: the private model for sensitive inboxes
Enjoyed this guide? Subscribe to the NeuralSutras newsletter for one practical AI lesson every Sunday, and follow our YouTube channel for step-by-step tutorials.
NeuralSutras. Practical AI for Everyone. Have a question or correction? We want to know: hello@neuralsutras.com
Akhilesh Angadi
Founder of NeuralSutras · writes about practical AI & software. Every NeuralSutras guide is tested, honest about limitations, and written to stay useful long-term.
One practical AI lesson, every week
No hype. No news roundups. Just one actionable guide on using AI to work smarter, every Sunday.
Subscribe free →