Monitor emails & send AI-generated auto-replies with Ollama & Telegram alerts
Pull contacts, verify each address with BillionVerify, and continue to Telegram β only deliverable addresses get through.
Why verify before the send
Sending to invalid, risky, catch-all, or disposable addresses spikes your bounce rate and erodes sender reputation. A verification gate before the Telegram step removes that risk automatically β only deliverable addresses continue, the rest are flagged.
The workflow
BillionVerify β verification sits right before the send.
Node by node
- 1Check Incoming Emails - IMAP (example: SOGo)SourceΒ· n8n
Provides or transforms the contact data flowing through the workflow.
- 2Ollama ModelSourceΒ· n8n
Provides or transforms the contact data flowing through the workflow.
- 3Send Notification from Incoming EmailSourceΒ· n8n
Provides or transforms the contact data flowing through the workflow.
- 4Dedicate Filtering As No-ResponseLogicΒ· n8n
Branches on the verification result: only deliverable addresses continue to the send; the rest are skipped and flagged.
- 5Basic LLM ChainSourceΒ· n8n
Provides or transforms the contact data flowing through the workflow.
- 6No OperationSourceΒ· n8n
Provides or transforms the contact data flowing through the workflow.
- 7Verify Email (BillionVerify)VerifyΒ· billionverify
The BillionVerify node verifies the address β status (valid / invalid / risky / catch-all / role / disposable), is_deliverable, and a confidence score β before anything is sent.
- 8IF deliverableLogicΒ· n8n
Branches on the verification result: only deliverable addresses continue to the send; the rest are skipped and flagged.
- 9Send Auto-Response in SMTP (example POSTFIX)SendΒ· n8n
Sends only to verified, deliverable addresses. Swap in your own provider node if you send elsewhere.
- 10Send Notification from ResponseSourceΒ· n8n
Provides or transforms the contact data flowing through the workflow.
Workflow JSON
Copy or download this workflow, then import it in n8n (Workflows β Import from File / Paste). Install the BillionVerify community node first, then add your API key credential.
{
"name": "Monitor emails & send AI-generated auto-replies with Ollama & Telegram alerts + BillionVerify",
"nodes": [
{
"id": "c12ebb83-47fd-470b-ba67-151e1b259b82",
"name": "No Operation",
"type": "n8n-nodes-base.noOp",
"position": [
-688,
704
],
"parameters": {},
"typeVersion": 1
},
{
"id": "3098bb59-a78d-4a8d-8253-466f98832ec0",
"name": "Send Notification from Incoming Email",
"type": "n8n-nodes-base.telegram",
"position": [
-1376,
464
],
"webhookId": "b794d98f-8eca-41d4-a91e-1cbdd0836300",
"parameters": {
"text": "=π§ **Incoming Email!**\n\nπ€ **Sender:** {{ $json.from }}\nπ **Subject:** {{ $json.subject }}\nπ
**Date-Time:** {{ $json.date }}\n\n---\n_Automatic notification from IMAP (SOGo) mailbox_",
"chatId": "=-1234567890123",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "credential-id",
"name": "telegramApi Credential"
}
},
"typeVersion": 1.1
},
{
"id": "45c29e94-e265-4853-a20d-60a1dc099ea8",
"name": "Dedicate Filtering As No-Response",
"type": "n8n-nodes-base.if",
"position": [
-1056,
464
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.from.value[0].address }}",
"value2": "noreply",
"operation": "notContains"
},
{
"value1": "={{ $json.from.value[0].address }}",
"value2": "no-reply",
"operation": "notContains"
},
{
"value1": "={{ $json.subject.toLowerCase() }}",
"value2": "newsletter",
"operation": "notContains"
}
]
}
},
"typeVersion": 1
},
{
"id": "78483eec-fc65-432b-9e7d-d41db7588647",
"name": "Check Incoming Emails - IMAP (example: SOGo)",
"type": "n8n-nodes-base.emailReadImap",
"position": [
-1664,
464
],
"parameters": {
"options": {}
},
"credentials": {
"imap": {
"id": "credential-id",
"name": "imap Credential"
}
},
"typeVersion": 2
},
{
"id": "19549685-fc0a-4ed3-bcaf-8be2c946cb79",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2208,
112
],
"parameters": {
"color": 4,
"width": 508,
"height": 216,
"content": "## IMAP Email Monitor with Smart Auto-Reply\n\nAutomated email handling with three core functions:\n1. Monitors incoming emails via IMAP\n2. Sends instant Telegram notifications\n3. Auto-replies to legitimate emails while filtering spam\n\nFilters out noreply addresses and newsletters."
},
"typeVersion": 1
},
{
"id": "1d5fe648-3529-41d2-a3c7-88e450be8461",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1776,
624
],
"parameters": {
"width": 300,
"height": 260,
"content": "## IMAP CONFIGURATION\n\nRequires IMAP credential:\n- Host: IMAP server address\n- Port: Usually 993 for SSL/TLS\n- Username: Email address\n- Password: App-specific password\n- SSL/TLS: Enabled\n\nPolls mailbox at configured intervals."
},
"typeVersion": 1
},
{
"id": "a03d2412-becc-4e7e-9bf3-e494177aa9db",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1488,
208
],
"parameters": {
"width": 332,
"height": 240,
"content": "## TELEGRAM NOTIFICATION\n\nSends immediate notification for every new email.\n\nIncludes: Sender, Subject, Date-Time\n\nRequires:\n- Chat ID (update -1234567890123)\n- Telegram API credential from @BotFather"
},
"typeVersion": 1
},
{
"id": "9ba3905c-85e1-41ed-999f-82b0d519a7f8",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1152,
624
],
"parameters": {
"width": 296,
"height": 260,
"content": "## SPAM FILTERING LOGIC\n\nBlocks auto-replies from:\n- Addresses containing noreply or no-reply\n- Subjects containing newsletter\n\nTrue path: Send auto-reply\nFalse path: No operation\n\nCustomize conditions as needed."
},
"typeVersion": 1
},
{
"id": "4b3795ef-d342-4818-a343-a18070c23132",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
96
],
"parameters": {
"width": 300,
"height": 328,
"content": "## AI-POWERED AUTO-REPLY\n\nSends personalized acknowledgment to legitimate senders.\n\nRequires SMTP credential:\n- Host: SMTP server (e.g., Postfix)\n- Port: 587 (STARTTLS) or 465 (SSL)\n- Credentials and secure connection\n\nUpdate fromEmail with your address.\nAuto-reply message generated by LLM based on email content."
},
"typeVersion": 1
},
{
"id": "a94c5eae-23f7-46cd-87d5-ef3a9be65cf2",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2208,
336
],
"parameters": {
"color": 4,
"width": 396,
"height": 240,
"content": "## CREDENTIALS REQUIRED\n\n1. IMAP Credential - for email monitoring\n2. SMTP Credential - for sending auto-replies\n3. Telegram API - bot token from @BotFather\n4. Ollama API - for LLM model access\n\nAll credentials configured in n8n credential manager.\n\nUse app-specific passwords for enhanced security."
},
"typeVersion": 1
},
{
"id": "0074dcf8-3b77-416b-912c-b1c91f42ad4c",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-480,
48
],
"parameters": {
"width": 300,
"height": 372,
"content": "## AI RESPONSE GENERATION\n\nUses LLM to generate contextual auto-reply.\n\nReads email content and identifies main topic in 2-4 words.\n\nGenerates personalized response:\n- Thanks sender for message\n- Mentions specific topic\n- Promises personal follow-up\n\nPrompt engineering ensures consistent format."
},
"typeVersion": 1
},
{
"id": "71246042-ba4d-4767-bf42-247ce4998014",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-480,
800
],
"parameters": {
"width": 300,
"height": 300,
"content": "## OLLAMA MODEL CONFIGURATION\n\nRequires Ollama API credential.\n\nModel: llama3.1\nContext window: 4096 tokens\n\nInstall Ollama locally or use remote instance.\n\nEnsure model is downloaded:\nollama pull llama3.1"
},
"typeVersion": 1
},
{
"id": "e3d171cc-c71a-4c82-acaf-1605e9ba38d3",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
272,
640
],
"parameters": {
"width": 300,
"height": 296,
"content": "## RESPONSE CONFIRMATION\n\nSends Telegram notification after auto-reply is sent.\n\nIncludes:\n- Original sender and subject\n- Generated AI response text\n\nConfirms successful auto-reply delivery."
},
"typeVersion": 1
},
{
"id": "82d9e05d-8cb2-46fb-9a05-825b6ab9cb85",
"name": "Ollama Model",
"type": "@n8n/n8n-nodes-langchain.lmOllama",
"position": [
-416,
672
],
"parameters": {
"model": "llama3.1:bf230501",
"options": {
"numCtx": 4096
}
},
"credentials": {
"ollamaApi": {
"id": "credential-id",
"name": "ollamaApi Credential"
}
},
"typeVersion": 1
},
{
"id": "0c1d9daa-3981-4918-872b-d6e121f8d23c",
"name": "Basic LLM Chain",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
-416,
448
],
"parameters": {
"text": "=Read the original email and identify its main topic or subject in 2-4 words maximum.\n\nORIGINAL EMAIL:\n{{ $('IMAP Email').item.json.textPlain }}\n\nReturn only this response, filling in the [TOPIC]:\n\nDear Correspondent! \nThank you for your message regarding [TOPIC]. \nI will respond with a personal message as soon as possible. \nHave a nice day!\n\nRULES:\n- Replace [TOPIC] with 2-4 words summarizing the email subject\n- Keep it simple and generic (e.g., \"your inquiry\", \"the project\", \"your request\")\n- Return ONLY the email text above\n- Do NOT add explanations or extra content",
"batching": {},
"messages": {
"messageValues": [
{
"message": "You are an email response assistant."
}
]
},
"promptType": "define"
},
"executeOnce": true,
"notesInFlow": false,
"retryOnFail": false,
"typeVersion": 1.7,
"alwaysOutputData": false
},
{
"id": "1905aad8-dcd2-49dc-83ea-c93f3b9d4737",
"name": "Send Auto-Response in SMTP (example POSTFIX)",
"type": "n8n-nodes-base.emailSend",
"position": [
80,
448
],
"webhookId": "5604120a-d9ba-484c-a1bf-38cf82b845af",
"parameters": {
"text": "={{ $json.text }}",
"options": {
"allowUnauthorizedCerts": true
},
"subject": "=Re: {{ $('Check Incoming Emails - IMAP (example: SOGo)').item.json.subject }}",
"toEmail": "={{ $('Check Incoming Emails - IMAP (example: SOGo)').item.json.from }}",
"fromEmail": "={{ $('Check Incoming Emails - IMAP (example: SOGo)').item.json.to }}"
},
"credentials": {
"smtp": {
"id": "credential-id",
"name": "smtp Credential"
}
},
"typeVersion": 2
},
{
"id": "d3a996dd-465f-46c7-acdd-1d0d1358a8bb",
"name": "Send Notification from Response",
"type": "n8n-nodes-base.telegram",
"position": [
80,
672
],
"webhookId": "b961caf3-fdec-4204-b8ee-a26ffebf9c9b",
"parameters": {
"text": "=π§ **Auto-Response Sent!**\n\nπ€ **Sender:** {{ $json.from }}\nπ **Subject:** {{ $json.subject }}\nπ
**Date-Time:** {{ $json.date }}\n\n**Response:** {{ $('Basic LLM Chain').item.json.text }}\n",
"chatId": "=-1234567890123",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "credential-id",
"name": "telegramApi Credential"
}
},
"typeVersion": 1.1
},
{
"parameters": {
"operation": "verify",
"email": "={{ $('Check Incoming Emails - IMAP (example: SOGo)').item.json.from }}",
"additionalOptions": {}
},
"type": "n8n-nodes-billionverify.billionVerify",
"typeVersion": 1,
"position": [
-280,
448
],
"name": "Verify Email (BillionVerify)",
"credentials": {
"billionVerifyApi": {
"id": "",
"name": "BillionVerify account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "is-deliverable",
"leftValue": "={{ $json.is_deliverable }}",
"rightValue": "",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
]
}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
-100,
448
],
"name": "IF deliverable"
}
],
"connections": {
"Ollama Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "Verify Email (BillionVerify)",
"type": "main",
"index": 0
}
]
]
},
"Dedicate Filtering As No-Response": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation",
"type": "main",
"index": 0
}
]
]
},
"Send Notification from Incoming Email": {
"main": [
[
{
"node": "Dedicate Filtering As No-Response",
"type": "main",
"index": 0
}
]
]
},
"Check Incoming Emails - IMAP (example: SOGo)": {
"main": [
[
{
"node": "Send Notification from Incoming Email",
"type": "main",
"index": 0
}
]
]
},
"Send Auto-Response in SMTP (example POSTFIX)": {
"main": [
[
{
"node": "Send Notification from Response",
"type": "main",
"index": 0
}
]
]
},
"Verify Email (BillionVerify)": {
"main": [
[
{
"node": "IF deliverable",
"type": "main",
"index": 0
}
]
]
},
"IF deliverable": {
"main": [
[
{
"node": "Send Auto-Response in SMTP (example POSTFIX)",
"type": "main",
"index": 0
}
],
[]
]
}
},
"settings": {
"executionOrder": "v1"
}
}When to use this
- Cleaning a list before a Telegram send or sync.
- Protecting Telegram deliverability and sender reputation.
- Keeping bounce rates low so your sending is never throttled.
FAQ
Why verify before sending in Telegram?
Verifying first keeps your bounce rate low, which protects your sender reputation and your results.
How do I import this workflow?
Download the JSON, then in n8n go to Workflows β Import from File (or paste it). Install the BillionVerify community node and add your API key credential.
What happens to risky or catch-all addresses?
They are routed to the false branch and excluded from the send. You decide whether to retry, review, or drop them.
Add verification to your workflow
Create a free account, grab your API key, and stop bounces before they happen.
Get started free