Smart email manager with Gmail, GPT-4 classification & auto-responses
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: Function (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| Function (legacy) Get Specific File Types, Get All Attachments | Code node, mode 'Run Once for All Items' |
Worth a look
- Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Email_Trigger)
Nodes used (15)
- Auto-fixing Output Parser
@n8n/n8n-nodes-langchain.outputParserAutofixing - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - Gmail Trigger
n8n-nodes-base.gmailTrigger - Gmail
n8n-nodes-base.gmail - Limit
n8n-nodes-base.limit - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Switch
n8n-nodes-base.switch - Aggregate
n8n-nodes-base.aggregate - Google Drive
n8n-nodes-base.googleDrive - Telegram
n8n-nodes-base.telegram - Merge
n8n-nodes-base.merge - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Function
n8n-nodes-base.function
What it does
AI Email Assistant - Smart Email Processing & Response π€ A sophisticated n8n workflow that transforms your email management with AI-powered classification, automatic responses, and intelligent organization. π― What This Workflow Does This advanced AI email assistant automatically: - Analyzes incoming emails using intelligent classification - Categorizes messages by priority, urgency, and type - Generates context-aware draft responses in your voice - Organizes emails with smart labeling and filing - Alerts you to urgent messages instantly - Manages attachments with cloud storage integration Perfect for busy professionals, customer service teams, and anyone drowning in email! β¨ Key Features π§ Intelligent Email Analysis - Context-Aware Processing: Understands email threads and conversation history - Smart Classification: Automatically categorizes by priority, urgency, and required actions - Multi-Criteria Assessment: Evaluates response needs, follow-up requirements, team involvement - Dynamic Label Management: Syncs with your Gmail labels for consistent organization π AI-Powered Response Generation - Professional Draft Creation: Generates contextually appropriate responses - Tone Matching: Mirrors the formality and style of incoming emails - Multiple Response Options: Provides alternatives for complex inquiries - Customizable Voice: Adapts to your business communication style π Smart Notification System - Urgent Email Alerts: Instant notifications for high-priority messages - Telegram/Slack Integration: Get alerts where you work - Smart Filtering: Only notifies when truly urgent - Quick Action Links: Direct links to Gmail for immediate response π Advanced Attachment Management - Automatic Cloud Upload: Saves attachments to Google Drive - Smart File Naming: Organized by date, sender, and content - Duplicate Detection: Prevents redundant uploads - File Type Filtering: Optional filtering for security π·οΈ Intelligent Organization - Auto-Labeling: Applies relevant Gmail labels automatically - Progress Tracking: Marks emails as "processed" or "digested" - Priority Indicators: Visual priority levels in your inbox - Category-Based Sorting: Groups similar emails together π οΈ Setup Instructions Prerequisites - n8n instance (cloud or self-hosted) - Gmail account with API access - OpenAI API key (or compatible AI service) - Google Drive account (for attachments) - Telegram bot (optional, for alerts) Step 1: Import the Workflow 1. Download AIEmailAssistantCommunityTemplate.json 2. In n8n, navigate to Templates β Import from File 3. Select the downloaded JSON file 4. The workflow will import as inactive Step 2: Configure Credentials Gmail Setup: 1. Create Gmail OAuth2 credentials in n8n 2. Configure the following nodes: - EmailTrigger - Get Conversation Thread - Get Latest Message Content - Create Draft Response - Assign Classification Label - Mark as Processed - Get All Gmail Labels 3. Test connections to ensure proper authentication AI Model Setup: 1. Configure the AI Language Model node 2. Options include: - OpenAI (GPT-4, GPT-3.5-turbo) - Anthropic Claude (recommended) - Local LLMs via Ollama 3. Add your API credentials 4. Test the connection Google Drive Setup (Optional): 1. Create Google Drive OAuth2 credentials 2. Configure nodes: - Upload to Google Drive - Check Existing Attachments 3. Replace YOURGOOGLEDRIVEFOLDERID with your folder ID 4. Create a dedicated folder for email attachments Telegram Alerts (Optional): 1. Create a Telegram bot via @BotFather 2. Get your chat ID 3. Configure the Send Urgent Alert node 4. Replace YOURTELEGRAMCHATID with your actual chat ID Step 3: Customize AI Instructions Email Classification (AI Email Classifier node): 1. Review the classification criteria in the system message 2. Adjust urgency keywords for your business 3. Modify priority levels based on your needs 4. Customize category definitions Response Generation (AI Response Generator node): 1. Update the response guidelines 2. Replace YOUR NAM