Description
Automated email labeling powered by GPT-4o to keep your inbox clean and categorized intelligently
📩 Never manually sort emails again — this workflow reads the content of every new Gmail message and uses AI to automatically apply the correct labels like “Partnership”, “Inquiry”, or “Notification”
🧠 What Problem Does It Solve
Manually reviewing and organizing incoming emails is inefficient and error-prone
This workflow automates that process using AI-powered labeling based on message context
🏷️ Labels included by default
✅ Partnership
✅ Inquiry
✅ Notification
⚙️ How It Works
📥 Polls Gmail every minute for new messages
📄 Fetches message content using Gmail ID
🧠 Sends message text to GPT-4o to determine relevant labels
🧾 Parses the AI response into structured label data
🔗 Merges AI-selected labels with your Gmail label IDs
🏷️ Applies matching labels to the email
✨ Key Features
🧠 Uses GPT-4o to analyze message intent and assign labels
🏷️ Works with custom labels defined by you
📨 Processes emails in real-time using Gmail polling
📊 Easily extendable for more categories or complex prompts
🧱 No-code friendly — built entirely in n8n
🧰 What You Need
✅ Gmail account with OAuth2 access
✅ Gmail labels pre-created (e.g., Partnership, Inquiry, Notification)
✅ OpenAI API key with GPT-4o access
✅ n8n cloud or self-hosted environment
🛠️ Setup Instructions
🔌 Connect Gmail and OpenAI credentials in n8n
🏷️ Create the desired labels in your Gmail account
✏️ Edit the AI prompt with your own label definitions
🧾 Update the JSON schema in the parser to reflect your label list
⏱️ (Optional) Change polling interval in Gmail Trigger node
🧪 Test the setup with a sample Gmail message
🔗 Integrations
Gmail
OpenAI GPT-4o
n8n