Templates / Categorize Gmail emails using GPT-4o-mini with multi-label analysis

Categorize Gmail emails using GPT-4o-mini with multi-label analysis

Ready for 3.0

by Radouane Driouich · 1,826 views · created 2025-07-07 · 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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This AI workflow has 8 nodes and runs on Gmail events. Along the way it connects Gmail and OpenAI Chat Model.

How it runs

Trigger: On Gmail events.

  1. Get Gmail Labels (Gmail): work with label
  2. Get Email Content (Gmail): get
  3. Prepare Prompt (Code): runs custom JavaScript code
  4. GPT‑4o‑mini Label Analyzer (Basic LLM Chain): sends a prompt to an LLM
  5. Find Multi-Labels ID (Code): runs custom JavaScript code
  6. Apply Multi-Labels (Gmail): add labels
  7. OpenAI Chat Model: uses OpenAI Chat Model

Services it uses

GmailOpenAI 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 (5)

From the author

Automatically Categorize Gmail Emails with GPT-4o-mini Multi-Label Analysis Description The "Automatically Categorize Gmail Emails with GPT-4o-mini Multi-Label Analysis" template is designed specifically for professionals, business owners, entrepreneurs, and…

Excerpt from Radouane Driouich'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.