IMAP Email Classifier & Gmail Auto-Reply with OpenAI in n8n
IMAP Email Classifier & Gmail Auto-Reply with OpenAI in n8n
Regular price
£54.99
Regular price
£54.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
âš¡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
IMAP Email Classifier & Gmail Auto-Reply with OpenAI in n8n
Regular price
£54.99
Regular price
£54.99
Sale price
Unit price
/
per
Automatically classify incoming IMAP emails and respond in Gmail—using OpenAI inside n8n
This n8n workflow checks your IMAP inbox every 5 minutes, uses OpenAI to categorize unread messages, and sends a category-specific auto-reply via Gmail to the original sender—covering support, sales, complaints, account requests, and general inquiries.
What this workflow does
- Scheduled email intake: Runs every 5 minutes using a Schedule Trigger.
- Reads unread messages: Fetches up to 10 unread emails from the IMAP INBOX (port 993 with secure enabled) and includes the email content.
- Cleans and prepares the message: Extracts key fields (sender, subject, date, message ID) and strips HTML from the email body.
- OpenAI classification: Sends the cleaned body to OpenAI (gpt-4o-mini) to return a JSON result including category, priority, sentiment, language, and a short summary.
- Routes by category: Uses category routing (SUPPORT, SALES, COMPLAINT, ACCOUNT, GENERAL) to build an appropriate reply message.
- Auto-replies with Gmail: Sends the generated reply back to the original sender using Gmail.
Use cases
- Speed up response times for customer support and general inquiries.
- Route sales questions to the right template automatically.
- Handle complaints and account requests with consistent, policy-aligned replies.
- Reduce manual triage for SaaS operators managing multiple inbound email types.
Technical details
- Nodes / components: Schedule Trigger, Email Read IMAP, Code, OpenAI classification step (gpt-4o-mini), Switch, Gmail, plus Sticky Note for workflow clarity.
- Required setup: IMAP credentials (IMAP host, port 993, secure, mailbox INBOX, app password), OpenAI API key, and Gmail OAuth2 account confirmed for the sender mailbox.
- Customization: Review and edit reply templates (tone, links, addresses, brand/policy wording).
Created by: Opus22 — AI Transformation Consulting
https://opus22.substack.com
