Auto-label incoming Gmail messages with AI nodes: n8n template
Auto-label incoming Gmail messages with AI nodes is a free n8n workflow template by Oskar with 11 nodes. It starts with the Gmail Trigger node ("Gmail trigger") and uses Gmail, Basic LLM Chain and OpenAI Chat Model. You can paste it into your n8n editor in one click with FlowLume.
What this workflow does, step by step
- Gmail trigger (Gmail Trigger node)
- Get message content (Gmail node)
- Assign labels for message (Basic LLM Chain node)
- JSON Parser (Structured Output Parser node)
- OpenAI Chat (OpenAI Chat Model node)
- Set label values (Edit Fields (Set) node)
- Get all labels (Gmail node)
- Split out assigned labels (Split Out node)
- Merge corresponding labels (Merge node)
- Aggregate label IDs (Aggregate node)
- Add labels to message (Gmail node)
What you need before you paste it
Connect these accounts in n8n
- Gmail (OAuth2) · used by Gmail trigger, Get message content, Get all labels, Add labels to message
- OpenAI · used by OpenAI Chat
Checked with FlowLume's setup checklist on 2026-11-25. In the extension, FlowLume Pro shows this checklist for any template before you paste.
Template facts
- Author
- Oskar (verified n8n creator)
- Nodes
- 11
- Apps
- Gmail Trigger, Gmail, Basic LLM Chain, OpenAI Chat Model
- Uses AI
- Yes (n8n AI nodes)
- Categories
- Ticket Management, AI Summarization
- Views on n8n.io
- 30,712
- Published
- 27 March 2024
- Price
- Free
How to paste it with FlowLume
- Install FlowLume. Add the free FlowLume extension to Google Chrome from the Chrome Web Store.
- Open n8n. Open a new or existing workflow in your n8n editor (n8n Cloud or self-hosted).
- Find the template. Click the FlowLume button at the bottom right and search for "Auto-label incoming Gmail messages with AI nodes".
- Paste it. Click Paste to n8n. All nodes and connections land on your canvas.
- Connect your accounts. Add your own credentials for Gmail (OAuth2), OpenAI, then run the workflow.
Similar n8n templates
- Gmail AI Auto-Responder: Create Draft Replies to incoming emailsGmail Trigger · OpenAI Chat Model · Gmail · Basic LLM Chain
- Suggest meeting slots using AIOpenAI Chat Model · Gmail · Gmail Trigger · Text Classifier
- 🧠 Empower your AI chatbot with long-term memory and dynamic tool routingGoogle Docs · Telegram · Gmail · OpenAI Chat Model
- Invoice data extraction with LlamaParse and OpenAIOpenAI Model · HTTP Request · Gmail Trigger · Google Sheets
- AI-Generated LinkedIn Posts with OpenAI, Google Sheets & Email Approval WorkflowHTTP Request · Schedule Trigger · OpenAI Chat Model · Google Sheets
- Invoices from Gmail to Drive and Google SheetsGmail Trigger · HTTP Request · Google Drive · Gmail
Template "Auto-label incoming Gmail messages with AI nodes" by Oskar, published on n8n.io. The template and its description belong to its author; this page only summarises its structure. FlowLume is an independent tool by DrakenLume and is not affiliated with n8n GmbH. n8n is a trademark of n8n GmbH.