Templates / Draft and label Gmail support and sales replies with OpenAI

Draft and label Gmail support and sales replies with OpenAI

Ready for 3.0

by Sergio Afonso · 59 views · created 2026-08-23 · Ticket Management, AI Summarization

Ready 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.

  1. Manual Configuration (Edit Fields (Set)): sets 22 fields: Company_Name, Company_Description, Services…
  2. Get Gmail Labels (Gmail): work with label
  3. Check Required Labels (Code): runs custom JavaScript code
  4. If: checks a condition and branches into true / false
  5. Already Processed? (If): checks a condition and branches into true / false
  6. Split Missing Labels (Code): runs custom JavaScript code
  7. Normalize Email Input (Edit Fields (Set)): sets 3 fields: Sender Name, Subject, Body
  8. Create Missing Labels (Gmail): create (label)
  9. Mail Classifier (Text Classifier): classifies text into categories with AI, with model: Categorize Chat Model
  10. 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

GmailGoogle SheetsOpenAI Chat Model

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)

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…

Excerpt from Sergio Afonso's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.