Block 1 - No Operation
- Type / Role
- n8n-nodes-base.noOp - noOp
- Config choices
- Version 1
This workflow is provided as-is. Please review and test before using in production.
Workflow Overview This advanced n8n workflow provides intelligent email automation with AI generated responses. It combines four core functions: 1. Monitors incoming emails via IMAP (e.g., SOGo) 2....
n8n-nodes-base.noop, n8n-nodes-base.telegram, n8n-nodes-base.if, n8n-nodes-base.emailreadimap, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.lmollama, @n8n/n8n-nodes-langchain.chainllm, n8n-nodes-base.emailsend
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Vigh Sandor.
Original n8n.io sourceThis advanced n8n workflow provides intelligent email automation with AI-generated responses. It combines four core functions:
Unlike traditional auto-responders, this workflow analyzes email content and creates unique, relevant responses for each message.
Before setting up this workflow, ensure you have:
Install Ollama on your system:
Download the llama3.1 model:
ollama pull llama3.1
Verify the model is available:
ollama list
Start Ollama service (if not already running):
ollama serve
Test the model:
ollama run llama3.1 "Hello, world!"
If using a remote Ollama server:
Create a Telegram bot via BotFather:
/newbot commandObtain your Chat ID:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdatesAdd Telegram API credential in n8n:
http://localhost:11434http://192.168.1.100:11434)chatId parameter with your Telegram Chat ID-1234567890123 with your actual chat IDllama3.1:bf230501 (or adjust to your installed version)fromEmail uses correct email address:{{ $('Check Incoming Emails - IMAP (example: SOGo)').item.json.to }}chatId parameter (same as first notification node)Perform initial configuration test:
curl http://localhost:11434/api/tagsExecute a test run:
Verify workflow execution:
Verify email delivery:
Send various types of test emails:
Review AI-generated responses:
Adjust the prompt if needed:
Once testing is successful and AI responses are satisfactory:
Monitor initial production runs:
Set up monitoring:
Once activated, the workflow operates fully automatically:
Email Monitoring: The workflow continuously checks your IMAP inbox for new messages based on the configured polling interval or trigger schedule.
Immediate Incoming Notification: When a new email arrives, you receive an instant Telegram notification containing:
Intelligent Filtering: The workflow evaluates each email against spam filter criteria:
AI Response Generation: For emails that pass the filter:
Automatic Reply Delivery: The AI-generated response is sent via SMTP to the original sender with:
Response Confirmation: After the auto-reply is sent, you receive a second Telegram notification showing:
The AI analyzes emails intelligently:
Example 1: Business Inquiry
Incoming Email: "I'm interested in your consulting services for our Q4 project..."
AI Topic Identification: "consulting services"
Generated Response: "Dear Correspondent! Thank you for your message regarding consulting services. I will respond with a personal message as soon as possible. Have a nice day!"
Example 2: Technical Support
Incoming Email: "We're experiencing issues with the API integration..."
AI Topic Identification: "API integration issues"
Generated Response: "Dear Correspondent! Thank you for your message regarding API integration issues. I will respond with a personal message as soon as possible. Have a nice day!"
Example 3: General Question
Incoming Email: "Could you provide more information about pricing?"
AI Topic Identification: "pricing information"
Generated Response: "Dear Correspondent! Thank you for your message regarding pricing information. I will respond with a personal message as soon as possible. Have a nice day!"
To modify which emails receive AI-generated auto-replies:
Block specific domains:
{{ $json.from.value[0].address }}
Operation: does not contain
Value: @spam-domain.com
Whitelist VIP senders (only respond to specific people):
{{ $json.from.value[0].address }}
Operation: contains
Value: @important-client.com
Filter by subject keywords:
{{ $json.subject.toLowerCase() }}
Operation: does not contain
Value: unsubscribe
Combine multiple conditions:
To change how the AI generates responses:
Example modifications:
Add company branding:
Return only this response, filling in the [TOPIC]:
Dear Correspondent!
Thank you for reaching out to [Your Company Name] regarding [TOPIC].
I will respond with a personal message as soon as possible.
Best regards,
[Your Name]
[Your Company Name]
Make it more casual:
Return only this response, filling in the [TOPIC]:
Hi there!
Thanks for your email about [TOPIC].
I'll get back to you personally soon.
Cheers!
Add urgency classification:
Read the email and classify urgency (Low/Medium/High).
Identify the main topic.
Return:
Dear Correspondent!
Thank you for your message regarding [TOPIC].
Priority: [URGENCY]
I will respond with a personal message as soon as possible.
Incoming Email Notification:
{{ $json.from }} - Full sender info{{ $json.from.value[0].address }} - Sender email only{{ $json.from.value[0].name }} - Sender name (if available){{ $json.subject }} - Email subject{{ $json.date }} - Date received{{ $json.textPlain }} - Email body (use cautiously for privacy){{ $json.to }} - Recipient addressResponse Confirmation Notification:
{{ $('Basic LLM Chain').item.json.text }}If you receive emails in multiple languages:
Detect the email language.
Generate response in the SAME language as the email.
If English: [English template]
If Hungarian: [Hungarian template]
If German: [German template]
Generate different responses based on sender importance:
To maintain a record of all AI interactions:
Test different prompt variations:
Problem: Telegram notifications not appearing
Solutions:
Problem: Auto-replies sent but content is empty or error messages
Solutions:
ollama listollama listollama run llama3.1 "Test message"Problem: AI generates irrelevant or inappropriate responses
Solutions:
Problem: Workflow executes but emails not delivered
Solutions:
Problem: Ollama consuming excessive CPU/RAM
Solutions:
Problem: Workflow can't connect to email server
Solutions:
Problem: Workflow doesn't execute automatically
Solutions:
Check Incoming Emails - IMAP: Polls email server at regular intervals to retrieve new messages from the configured mailbox.
Send Notification from Incoming Email: Immediately sends formatted notification to Telegram for every new email detected, regardless of spam status.
Dedicate Filtering As No-Response: Evaluates emails against spam filter criteria to determine if AI processing should occur.
No Operation: Placeholder node for filtered emails that should not receive an auto-reply (spam, newsletters, automated messages).
Ollama Model: Provides the AI language model (llama3.1) used for natural language processing and response generation.
Basic LLM Chain: Executes the AI prompt against the email content to generate contextual auto-reply text.
Send Auto-Response in SMTP: Sends the AI-generated acknowledgment email back to the original sender via SMTP server.
Send Notification from Response: Sends confirmation to Telegram showing the auto-reply was successfully sent, including the AI-generated content.
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Monitor emails & send AI-generated auto-replies with Ollama & Telegram alerts |
|---|---|
| Complexity | advanced |
| Nodes | 17 |
| Categories | Ticket Management, Multimodal AI |
| Author | Vigh Sandor |
| Published | 23 Oct 2025 |
Use the JSON export at /data/workflows/10084/10084.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
Workflow Overview This advanced n8n workflow provides intelligent email automation with AI generated responses. It combines four core functions: 1. Monitors incoming emails via IMAP (e.g., SOGo) 2....
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Ticket Management, Multimodal AI use case.