AI Agents
Automatic email canonical tagging in Gmail using OpenAI and Gmail API
13 nodes
207
155
Automatic trigger
Workflow Description
Automatically tag and categorize incoming Gmail messages using an AI agent powered by OpenAI. The workflow monitors new emails, analyzes content intelligently, and applies relevant labels through Gmail API without manual intervention.
How it works
- 1.Trigger activates on new Gmail messages to capture email data in real time
- 2.AI agent analyzes email content using OpenAI to determine appropriate category or tag
- 3.Apply the identified tag to the email through Gmail API integration
- 4.Store classification decisions in memory buffer for continuous learning and context
- 5.Wait and repeat for each subsequent email automatically
Use cases
- Organize emails by type, urgency, or department without manual sorting
- Separate customer inquiries, vendor communications, and internal messages automatically
- Reduce email management time by delegating classification to intelligent automation
Requirements
- Active Gmail account with Gmail API enabled
- Valid OpenAI API key with sufficient credits
- n8n workflow connected to both Gmail and OpenAI services
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
207
Downloads
155
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