
Back to Portfolio
AI Automation
Smart Gmail Automation
AI-Powered Email Classification & Draft Generation System
Project Overview
ZATNav has developed an intelligent Gmail automation system that reads incoming emails, classifies them by intent using AI, generates context-aware replies, and saves them as human-reviewed drafts, combining n8n workflow automation with large language model intelligence for a supervised, efficient email management pipeline.
Inquiry path execution
Technical Architecture
The Smart Gmail Automation system comprises the following components:
Gmail Trigger Monitors the inbox in real time and fires the workflow the moment a new email is received
Wait Node Introduces a deliberate pause after trigger to allow full email sync and prevent Gmail API rate limit conflicts
Text Classifier Reads the incoming email body and classifies it into one of two intent categories (Order or Inquiry) using Google Gemini as the underlying language model
Order Handler (Message a Model) A dedicated AI node that generates a tailored reply for order-related emails, addressing purchase, transaction, or status-related queries with appropriate tone and structure
Inquiry Handler (Message a Model) A separate AI node that composes a professional response for general questions or information requests, with tone calibrated for consultative communication
Create a Draft Both branches converge at this node, which saves the AI-generated reply as a Gmail draft for human review and approval before sending, ensuring quality control at every step
Workflow Logic
The system uses a branching classification approach:
Emails are automatically routed based on detected intent
Each branch has its own AI prompt configuration for category-appropriate replies
No email is ever sent automatically, all replies are saved as drafts
Human oversight is preserved at the final step before any outreach

Figure: Smart Gmail Automation Workflow
Outcomes & Impact
Reduced manual email drafting time by routing and pre-writing replies automatically
Enabled consistent, professional tone across all outgoing email categories
Human-in-the-loop design ensures zero accidental sends
Extensible architecture with Tools slots on each AI node for future integration with order databases, CRM systems, or FAQ knowledge bases
Project Info
Category
AI Automation
Key Features
AI-powered email intent classification into Order and Inquiry categories
Separate AI reply generation per category for tone-accurate responses
Human-review-first design, all replies saved as Gmail drafts, never auto-sent
Powered by Google Gemini Chat Model as the classification and generation backbone
Extensible Tools slots on each AI node for future CRM or database integration
Tech Stack
n8nGoogle GeminiGmail APIText ClassifierWorkflow Automation
Tags
AutomationAIn8nGmailEmailNLPProductivity
