Automate email triage with GPT-4.1-mini classification and Gmail auto-replies
Ready for 3.0What this workflow does
This AI workflow has 19 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI Chat Model, OpenAI and Google Sheets.
How it runs
Trigger: On Gmail events.
- Name Extractor (Information Extractor): extracts structured fields from text with AI, with model: OpenAI Chat Model
- If: checks a condition and branches into true / false
- Name Found (Edit Fields (Set)): sets 1 field: intro_line
- Name Not Found (Edit Fields (Set)): sets 1 field: intro_line
- Single Intro Line (Merge): merges the data from its input branches
- Reducing content before LLM (Edit Fields (Set)): sets 4 fields: intro_line, email_body, message_id…
- AI-Classification & Sentiment Analysis (Text Classifier): classifies text into categories with AI, with model: OpenAI Chat Model
- Label - Agency Lead (Gmail): add labels
- Label - Course Request (Gmail): add labels
- Label - Paid Collaborations (Gmail): add labels
…plus 6 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger).
Nodes used (10)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - If
n8n-nodes-base.if - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Edit Fields (Set)
n8n-nodes-base.set - Gmail
n8n-nodes-base.gmail - OpenAI
@n8n/n8n-nodes-langchain.openAi - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - Merge
n8n-nodes-base.merge - Text Classifier
@n8n/n8n-nodes-langchain.textClassifier - Google Sheets
n8n-nodes-base.googleSheets
From the author
How it works: - Detects new unread Gmail messages - Extracts sender name for personalized replies - Classifies the email into one of four categories - Applies the correct Gmail label and either sends an auto-reply, creates a draft, or logs the contact in…