This workflow follows the Chainllm → Emailsend recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "HYPEAKZ \u2014 AI Email Classifier & Auto-Responder (Local Ollama)",
"nodes": [
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute",
"minute": 5
}
]
},
"filters": {
"readStatus": "unread"
}
},
"id": "node-imap",
"name": "Check Inbox (IMAP)",
"type": "n8n-nodes-base.imapEmail",
"typeVersion": 2,
"position": [
250,
300
]
},
{
"parameters": {
"model": "llama3.2",
"baseUrl": "http://ollama:11434"
},
"id": "node-ollama",
"name": "Ollama Local LLM",
"type": "@n8n/n8n-nodes-langchain.lmOllama",
"typeVersion": 1,
"position": [
650,
500
]
},
{
"parameters": {
"categories": {
"categories": [
{
"category": "URGENT",
"description": "Time-sensitive requests, deadlines, emergencies"
},
{
"category": "CLIENT_REQUEST",
"description": "Client questions, project inquiries, feedback"
},
{
"category": "INVOICE",
"description": "Invoices, payment requests, billing"
},
{
"category": "NEWSLETTER",
"description": "Marketing emails, newsletters, promotions"
},
{
"category": "SPAM",
"description": "Unwanted, irrelevant, or suspicious emails"
},
{
"category": "INTERNAL",
"description": "Team communication, internal updates"
}
]
},
"options": {
"systemMessage": "You are an email classifier for a business. Classify the email into exactly one category. Be precise."
}
},
"id": "node-classifier",
"name": "Classify Email (AI)",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"typeVersion": 1,
"position": [
650,
300
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.category }}",
"operation": "equals",
"value2": "URGENT"
}
]
}
},
"id": "node-switch-urgent",
"name": "Is Urgent?",
"type": "n8n-nodes-base.switch",
"typeVersion": 3,
"position": [
900,
200
]
},
{
"parameters": {
"prompt": "Write a brief, professional acknowledgment email reply. The sender's email was about: {{ $('Check Inbox (IMAP)').item.json.subject }}. Confirm receipt, mention you'll respond in detail within 2 hours. Keep it under 3 sentences. Sign as 'Best regards, [Your Name]'."
},
"id": "node-draft-reply",
"name": "Draft Urgent Reply (AI)",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.4,
"position": [
1150,
100
]
},
{
"parameters": {
"fromEmail": "={{ $env.SMTP_USER }}",
"toEmail": "={{ $('Check Inbox (IMAP)').item.json.from }}",
"subject": "Re: {{ $('Check Inbox (IMAP)').item.json.subject }}",
"text": "={{ $json.text }}"
},
"id": "node-send-reply",
"name": "Send Auto-Reply",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2.1,
"position": [
1400,
100
]
},
{
"parameters": {
"values": {
"string": [
{
"name": "email_from",
"value": "={{ $('Check Inbox (IMAP)').item.json.from }}"
},
{
"name": "subject",
"value": "={{ $('Check Inbox (IMAP)').item.json.subject }}"
},
{
"name": "category",
"value": "={{ $json.category }}"
},
{
"name": "processed_at",
"value": "={{ $now.toISO() }}"
}
]
}
},
"id": "node-log",
"name": "Log to Spreadsheet",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
900,
450
]
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"mode": "list"
},
"sheetName": {
"__rl": true,
"value": "Email Log"
}
},
"id": "node-sheets",
"name": "Save to Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
1150,
450
]
}
],
"connections": {
"Check Inbox (IMAP)": {
"main": [
[
{
"node": "Classify Email (AI)",
"type": "main",
"index": 0
}
]
]
},
"Classify Email (AI)": {
"main": [
[
{
"node": "Is Urgent?",
"type": "main",
"index": 0
},
{
"node": "Log to Spreadsheet",
"type": "main",
"index": 0
}
]
]
},
"Ollama Local LLM": {
"ai_languageModel": [
[
{
"node": "Classify Email (AI)",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Draft Urgent Reply (AI)",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Is Urgent?": {
"main": [
[
{
"node": "Draft Urgent Reply (AI)",
"type": "main",
"index": 0
}
]
]
},
"Draft Urgent Reply (AI)": {
"main": [
[
{
"node": "Send Auto-Reply",
"type": "main",
"index": 0
}
]
]
},
"Log to Spreadsheet": {
"main": [
[
{
"node": "Save to Google Sheets",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": true
},
"tags": [
{
"name": "HYPEAKZ.IO"
},
{
"name": "Self-Hosted AI"
},
{
"name": "Ollama"
},
{
"name": "Email Automation"
},
{
"name": "Privacy-First"
}
]
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
HYPEAKZ — AI Email Classifier & Auto-Responder (Local Ollama). Uses imapEmail, lmOllama, textClassifier, chainLlm. Manual trigger; 8 nodes.
Source: https://github.com/dankofly/selfhosted-ai-kit/blob/main/workflows/01-email-classifier.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This template is for HR teams, recruitment agencies, and startups that receive job applications via Indeed and want to eliminate manual CV screening. If you're spending hours reading CVs before decidi
This advanced n8n workflow provides intelligent email automation with AI-generated responses. It combines four core functions: Monitors incoming emails via IMAP (e.g., SOGo) Sends instant Telegram not
The workflow is triggered manually with user input, searches LinkedIn profiles, processes the results using AI, generates connection recommendations, and delivers them via email. It leverages AI to en
HYPEAKZ — Customer Feedback Sentiment Analyzer (100% Local). Uses googleSheetsTrigger, lmOllama, textClassifier, chainLlm. Event-driven trigger; 7 nodes.
In this guide, we’ll break down how to set up an AI-powered auto-reply system that works while you sleep. Ready to 10X your efficiency? Let’s dive in! AI-driven auto-responses for Email. Instant repli