👉 n8n No Limits Access :

https://www.hostg.xyz/SHHAd

Hébergement VPS n8n | Automatisation sécurisée et évolutive

coupon -15% : DRFIRAS15

👉 Formation n8n en Français

Formation n8n en Français : Automatisation & Agents IA

coupon -20% : LANCEMENT : HERE


Intro

This workflow watches a Gmail inbox, uses AI (OpenAI) to decide whether an incoming email actually needs a reply, and — only when it does — drafts a full response and saves it directly as a draft in the original Gmail thread. Nothing is ever sent automatically: you review and send it yourself. This course lets you rebuild the whole thing node by node, live.

<aside> 🎯

Improvement over the older "Email auto-responder" template: added a centralized Configuration node, added an excluded-senders filter, and replaced the "LLM Chain + JSON Parser" duo with the native Text Classifier node for the "does this need a reply?" decision.

</aside>

Flow diagram

Gmail Trigger
  → Configuration
    → Skip excluded senders (IF)
        ├─ true  → Sender excluded - do nothing (end)
        └─ false → Classify if reply is needed (Text Classifier)
                      ├─ needs_reply            → Generate email reply (LLM Chain) → Create Gmail draft reply
                      └─ no_reply_needed / other → No reply needed - do nothing (end)

Prerequisites & credentials

Credential Type Where to get it
Gmail account Gmail OAuth2 n8n → Credentials → New → Gmail OAuth2 → follow the Google consent screen. The Gmail "modify" scope is required (needed to create drafts).
OpenAi account OpenAi API platform.openai.com → API keys → Create new secret key. Paste the key into a new "OpenAi API" credential in n8n. Make sure the key has access to GPT-5 family models.

Node-by-node build guide

1. Watch inbox for new emails (Gmail Trigger)

Type: n8n-nodes-base.gmailTrigger v1.4