Classify incoming Gmail messages automatically with AI intelligence
Workflow Description
This automation captures new Gmail messages and classifies them intelligently using OpenAI's language model, enabling smart inbox organization and reducing manual sorting efforts for your team.
How it works
- 1.Monitor and trigger on new incoming Gmail messages in real time
- 2.Extract message content and prepare it for AI processing
- 3.Send messages through an LLM chain to analyze and categorize them
- 4.Parse structured classification results from the AI model
- 5.Apply categories to emails or export organized data
Use cases
- Automatically sort emails by priority, topic, or urgency level
- Separate critical messages from routine notifications and spam
- Route customer inquiries (complaints, requests, feedback) to appropriate teams
Requirements
- Active Gmail account with API access enabled
- OpenAI API key with valid subscription and sufficient credits
- Pre-defined classification categories tailored to your business needs
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (19)
Gmail trigger
Gmail
Get message content
Gmail
Set label values
Set
Get all labels
Gmail
Split out assigned labels
Split Out
Merge corresponding labels
Merge
Aggregate label IDs
Aggregate
Add labels to message
Gmail
Assign labels for message
LLM Chain
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note6
Sticky Note
Sticky Note7
Sticky Note
Sticky Note8
Sticky Note
JSON Parser
Output Parser Structured
OpenAI Chat
OpenAI