AI Agents
Automatic email categorization in Gmail using AI
13 nodes
305
177
Automatic trigger
Workflow Description
This automation monitors incoming Gmail messages and uses OpenAI to analyze their content and determine appropriate category labels. It applies tags automatically while maintaining conversation context through a memory buffer to improve classification accuracy over time.
How it works
- 1.Trigger on new incoming email in Gmail
- 2.Send email content to OpenAI for analysis
- 3.Determine category and apply suitable label
- 4.Add label to email and store context for future reference
Use cases
- Automatically organize inbox by email type and priority
- Reduce manual email sorting time and human error
- Build adaptive system that learns from email patterns
Requirements
- Gmail account with full API access enabled
- Active OpenAI API key with sufficient quota
- Memory configuration to track context across emails
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Gmail
OpenAI
AI Agent
Memory
Details
Trigger
Automatic trigger
Nodes
13
Apps
4
Views
305
Downloads
177
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 (13)
/
Gmail Trigger
Gmail
OpenAI Chat Model1
OpenAI
Gmail - read labels
Gmail
Gmail - get message
Gmail
Gmail - add label to message
Gmail
Gmail - create label
Gmail
Gmail labelling agent
Agent
Window Buffer Memory
Memory Buffer Window
Wait
Wait
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note