🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Gmail + Google Gemini: replies and drafts handled

Lisa Granqvist Partner Workflow Automation Expert

Your inbox isn’t hard because of typing. It’s hard because of deciding. Every new email forces a tiny judgment call, and after about 30 of them, you’re cooked.

Marketing managers feel it when partner emails get buried under promos. Freelancers feel it when a “quick question” turns into an hour of back-and-forth. And ops leads end up doing support triage they never signed up for. This Gmail Gemini replies automation sorts the mess and keeps you responsive without sounding like a robot.

You’ll see how the workflow reads each email, decides “reply / draft / ignore,” and then either sends a safe response or leaves you a draft to approve in Gmail.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Gmail + Google Gemini: replies and drafts handled

The Problem: Inbox Triage Eats Your Best Hours

Most inbox “work” isn’t real work. It’s scanning subject lines, opening threads, figuring out if it’s urgent, then rewriting the same polite reply you wrote last week. The worst part is the context switching. You might be deep in a proposal, then one email pulls you into billing, then another drags you into scheduling, and suddenly the morning’s gone. And if you ignore the inbox, you pay for it later with awkward follow-ups, missed requests, or a client wondering if you disappeared.

The friction compounds. Here’s where it breaks down in real life.

  • Routine messages still take a few minutes each because you don’t want to sound cold or rushed.
  • Important emails hide behind newsletters, promotions, and automated notifications that look “kind of” relevant.
  • Sensitive threads can’t be automated safely, so you hesitate, and the delay makes things worse.
  • When you’re busy, you reply faster but sloppier, which means more cleanup later.

The Solution: Gemini Classifies, n8n Replies or Drafts

This workflow turns your inbox into a simple decision tree that runs itself. A Gmail trigger watches for new incoming messages, then pulls the full email details so the AI has real context (not just the subject line). Google Gemini reads the message and categorizes it into one of three buckets: “Reply” (safe to answer now), “Draft” (needs your eyes), or “Nothing” (ignore). If it’s safe, Gemini helps write a warm, professional response and n8n sends it via Gmail automatically. If it’s sensitive or complex, the workflow generates a draft in Gmail so you can review and hit send when it looks right. And if it’s noise, it quietly does nothing. Honestly, that last part is underrated.

The workflow starts with a new email arriving in Gmail. Gemini then classifies the message and routes it through a switch, so only the appropriate path runs. Finally, Gmail either sends an immediate reply, creates a draft for review, or leaves the message alone.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you get about 40 emails a day, and around 25 of them need a decision (reply, later, or ignore). If you spend even 2 minutes reading and deciding, that’s roughly 80 minutes daily. With this workflow, you still skim the handful of “Draft” messages, but “Reply” emails can be handled automatically and “Nothing” disappears from your mental to-do list. In practice, many people go from about an hour of inbox triage to about 15 minutes of review.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Gmail to read, draft, and send emails
  • Google Gemini API for classification and writing
  • Gemini API key (get it from Google AI Studio)

Skill level: Intermediate. You’ll connect OAuth credentials in n8n and adjust a couple of AI prompts safely.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A new email hits your inbox. The Gmail Trigger (“Inbox Watcher”) fires immediately, then the workflow fetches full message details so the AI isn’t guessing.

Gemini reads and classifies the message. The AI classifier evaluates the content and tags it as “Reply,” “Draft,” or “Nothing,” which keeps the logic simple and predictable.

n8n routes it down the right path. A switch node sends “Reply” emails to a reply-writing agent, “Draft” emails to a draft-writing agent, and everything else to a no-op handler (so nothing happens).

Gmail sends or saves the result. Auto-replies are sent through the Gmail integration, while draft replies are created in Gmail so you can review them in the place you already work.

You can easily modify the classification rules to be stricter (more drafts) or more aggressive (more auto-replies) based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Gmail Trigger

Set up the workflow to watch your inbox for new messages and pass the message ID downstream.

  1. Add the Gmail Inbox Watcher node as the trigger.
  2. In Gmail Inbox Watcher, keep Simple set to false.
  3. Set Poll Times to everyMinute to check for new messages frequently.
  4. Credential Required: Connect your gmailOAuth2 credentials.

Step 2: Connect Gmail Message Retrieval

Fetch full email content so the classifier and reply agents have access to subject, body, and headers.

  1. Add Fetch Message Details and connect it to Gmail Inbox Watcher.
  2. Set Operation to get.
  3. Set Message ID to ={{ $json.id }}.
  4. Credential Required: Connect your gmailOAuth2 credentials.

Flowpast Branding is a sticky note used for documentation and can be left as-is.

Step 3: Set Up the AI Classification Layer

Configure the AI model and classifier so each email is labeled as Reply, Draft, or Nothing.

  1. Add Gemini Chat Engine and set Model Name to models/gemini-2.5-flash-preview-05-20.
  2. Credential Required: Connect your googlePalmApi credentials in Gemini Chat Engine.
  3. Add AI Email Classifier and set Prompt Type to define.
  4. Set the Text field to the full classification prompt, including {{ $json.text }} for the email content.
  5. Connect Gemini Chat Engine to AI Email Classifier as the language model. Ensure credentials are added to Gemini Chat Engine, not the sub-node.

Step 4: Configure Routing by Category

Route classifier results to automatic reply, draft creation, or no action based on the output.

  1. Add Route by Category and connect it to AI Email Classifier.
  2. Configure three rules using Left Value ={{ $json.output }} with Right Value set to Reply, Draft, and Nothing.
  3. Route by Category outputs to Compose Auto Reply, Compose Draft Reply, and No-Action Handler in parallel based on the matched rule.

⚠️ Common Pitfall: If the classifier returns lowercase values, the switch will not match. Ensure the classifier outputs exactly Reply, Draft, or Nothing.

Step 5: Configure AI Reply Generation and Gmail Actions

Set up the reply generators and send actions for the Reply and Draft paths.

  1. Add Gemini Reply Model and Gemini Draft Model with Model Name set to models/gemini-2.5-flash-preview-05-20.
  2. Credential Required: Connect your googlePalmApi credentials in both Gemini Reply Model and Gemini Draft Model.
  3. In Compose Auto Reply and Compose Draft Reply, set Text to the full prompt and include {{ $('Fetch Message Details').item.json.headers.subject }} and {{ $('Fetch Message Details').item.json.text }}.
  4. Connect Gemini Reply Model to Compose Auto Reply and Gemini Draft Model to Compose Draft Reply. Add credentials to the Gemini model nodes, not the agent nodes.
  5. In Send Reply Email, set Operation to reply, Message to ={{ $json.output }}, and Message ID to ={{ $('Fetch Message Details').item.json.id }}.
  6. Credential Required: Connect your gmailOAuth2 credentials in Send Reply Email.
  7. In Create Review Draft, set Resource to draft, Message to ={{ $json.output }}, Subject to ={{ $('Fetch Message Details').item.json.subject }}, Send To to ={{ $('Fetch Message Details').item.json.from.value[0].address }}, and Thread ID to ={{ $('Fetch Message Details').item.json.threadId }}.
  8. Credential Required: Connect your gmailOAuth2 credentials in Create Review Draft.
  9. Leave No-Action Handler as-is to terminate the Nothing branch without action.

Tip: Update the prompt in Compose Auto Reply and Compose Draft Reply to replace [YOUR_NAME] with your real name for personalized replies.

Step 6: Test and Activate Your Workflow

Validate each branch and ensure replies are generated, drafted, or ignored as expected.

  1. Click Execute Workflow and send a test email to the monitored inbox.
  2. Verify that Fetch Message Details retrieves the full message and AI Email Classifier outputs Reply, Draft, or Nothing.
  3. Confirm Send Reply Email sends a reply for the Reply category and Create Review Draft creates a Gmail draft for the Draft category.
  4. Check that the Nothing category ends at No-Action Handler with no outbound email.
  5. When satisfied, toggle the workflow to Active to enable continuous monitoring.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Gmail OAuth credentials can expire or lose scopes after a security change. If sends or drafts fail, check the Gmail credential in n8n and re-auth first.
  • If you add Wait nodes (or rely on external AI latency), processing times vary. Bump up the wait duration if downstream steps sometimes run before the AI response is ready.
  • Gemini prompts that are too generic create bland replies. Add your tone, sign-off, and “never do this” rules early or you will be editing forever.

Frequently Asked Questions

How long does it take to set up this Gmail Gemini replies automation?

About 30 minutes if your Gmail and Gemini access are ready.

Do I need coding skills to automate Gmail Gemini replies?

No. You’ll connect accounts and adjust a prompt or two.

Is n8n free to use for this Gmail Gemini replies workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Google Gemini API usage costs, which depend on your volume.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Gmail Gemini replies workflow for a stricter “draft-only” policy?

Yes, but do it deliberately. In the AI Email Classifier prompt, tighten the rules so anything uncertain becomes “Draft.” You can also change the Route by Category switch so only the Draft path runs, and the Send Reply Email path is never used. Common customizations include adding VIP sender rules, blocking auto-replies for billing topics, and forcing drafts for any email that mentions refunds or legal terms.

Why is my Gmail connection failing in this workflow?

Usually it’s expired Gmail OAuth access or missing scopes after you reconnected the account. Re-auth the Gmail credential in n8n and confirm it has permission to read, send, and create drafts. If it fails only sometimes, you may be hitting Google API limits on busy days. Also check that the workflow is fetching message details before the AI runs, because incomplete data can cascade into errors.

How many emails can this Gmail Gemini replies automation handle?

A typical setup can handle hundreds of emails per day, and the real limit is your n8n execution quota (on Cloud) plus Gemini API usage.

Is this Gmail Gemini replies automation better than using Zapier or Make?

Often, yes, if you care about control. This workflow has branching logic (reply vs draft vs ignore), and n8n handles that cleanly without turning every decision into extra billable steps. You also have the option to self-host for unlimited executions, which changes the math when your inbox volume grows. Zapier or Make can still be a fine choice if you only want a simple “summarize and send to Slack” type of flow. If you’re unsure, Talk to an automation expert and you’ll get a straight recommendation.

Your inbox doesn’t need more willpower. It needs a system. Set this up once, review drafts in Gmail when it matters, and let the routine replies handle themselves.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal