Draft and label Gmail support and sales replies with OpenAI
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This AI workflow has 30 nodes and runs on Gmail events. Along the way it connects Gmail, Google Sheets and OpenAI Chat Model.
How it runs
Trigger: On Gmail events.
- Manual Configuration (Edit Fields (Set)): sets 22 fields: Company_Name, Company_Description, Services…
- Get Gmail Labels (Gmail): work with label
- Check Required Labels (Code): runs custom JavaScript code
- If: checks a condition and branches into true / false
- Already Processed? (If): checks a condition and branches into true / false
- Split Missing Labels (Code): runs custom JavaScript code
- Normalize Email Input (Edit Fields (Set)): sets 3 fields: Sender Name, Subject, Body
- Create Missing Labels (Gmail): create (label)
- Mail Classifier (Text Classifier): classifies text into categories with AI, with model: Categorize Chat Model
- Support Agent (AI Agent): runs an AI agent, with model: Draft Chat Model; output parser: Output Parser
…plus 16 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger).
Nodes used (10)
- Gmail
n8n-nodes-base.gmail - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Gmail Trigger
n8n-nodes-base.gmailTrigger - Text Classifier
@n8n/n8n-nodes-langchain.textClassifier - AI Agent
@n8n/n8n-nodes-langchain.agent - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
From the author
Quick overview Automatically triage incoming Gmail messages and prepare AI-generated replies with OpenAI while keeping a human in control. This workflow monitors unread emails in your Gmail inbox, classifies each message as Support, Sales, Information, or…