Basic automatic Gmail email labelling with OpenAI and Gmail API: n8n template
Basic automatic Gmail email labelling with OpenAI and Gmail API is a free n8n workflow template by Martijn Kerver with 9 nodes. It starts with the Gmail Trigger node ("Gmail Trigger") and uses OpenAI Chat Model, Gmail Tool and AI Agent. You can paste it into your n8n editor in one click with FlowLume.
What this workflow does, step by step
- Gmail Trigger
- Wait
- Gmail labelling agent (AI Agent node)
- OpenAI Chat Model1 (OpenAI Chat Model node)
- Gmail - get message (Gmail Tool node)
- Gmail - read labels (Gmail Tool node)
- Gmail - create label (Gmail Tool node)
- Window Buffer Memory (Simple Memory node)
- Gmail - add label to message (Gmail Tool node)
What you need before you paste it
Connect these accounts in n8n
- Gmail (OAuth2) · used by Gmail Trigger, Gmail - read labels, Gmail - get message, Gmail - add label to message, Gmail - create label
- OpenAI · used by OpenAI Chat Model1
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
- Martijn Kerver
- Nodes
- 9
- Apps
- Gmail Trigger, OpenAI Chat Model, Gmail Tool, AI Agent
- Uses AI
- Yes (n8n AI nodes)
- Categories
- Personal Productivity, AI Summarization
- Views on n8n.io
- 177,566
- Published
- 17 January 2025
- 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 "Basic automatic Gmail email labelling with OpenAI and Gmail API".
- 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
- Angie, personal AI assistant with Telegram voice and textTelegram Trigger · Telegram · OpenAI · AI Agent
- Gmail AI Email ManagerGmail Trigger · Gmail · Anthropic Chat Model · AI Agent
- Suggest meeting slots using AIOpenAI Chat Model · Gmail · Gmail Trigger · Text Classifier
- Jarvis: productivity AI agent for tasks, calendar, email & expense using MCPsOpenAI Chat Model · MCP Client Tool · MCP Server Trigger · Gmail Tool
- Advanced AI Demo (Presented at AI Developers #14 meetup)Slack · Embeddings OpenAI · OpenAI Chat Model · Vector Store Retriever
- AI agent chatChat Trigger · OpenAI Chat Model · Http Request Tool · AI Agent
Template "Basic automatic Gmail email labelling with OpenAI and Gmail API" by Martijn Kerver, 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.