This workflow corresponds to n8n.io template #6012 — we link there as the canonical source.
This workflow follows the Agent → HTTP Request 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 →
{
"id": "Rkx3j2cBXiT3NLtq",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Create a Privacy-Focused AI Assistant with Telegram, Ollama, and Whisper",
"tags": [],
"nodes": [
{
"id": "60ac6d31-82e4-4895-95fd-8c62a635b81b",
"name": "Telegram Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
0,
-20
],
"parameters": {
"updates": [
"message"
],
"additionalFields": {
"download": true
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "9a8e1386-d472-4c2c-9f44-f0d8df6d02e0",
"name": "Get Voice File",
"type": "n8n-nodes-base.telegram",
"position": [
660,
-45
],
"parameters": {
"fileId": "={{ $json.message.voice.file_id }}",
"resource": "file"
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.1
},
{
"id": "f258d1ef-fcab-420a-a7a9-61b7f80cec5d",
"name": "Message Type Switch",
"type": "n8n-nodes-base.switch",
"position": [
440,
-120
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "text",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a2d6691c-beed-44d8-a67f-be43b28155df",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.text }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "voice",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6ce5f222-d555-470b-862d-e132b9a5fb72",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.voice.file_id }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "2507b938-0a44-44f6-838a-6ccc33e27d24",
"name": "Authorization Check If",
"type": "n8n-nodes-base.if",
"position": [
220,
-20
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "d2e36e10-3ffc-47ab-bf1a-3c9639b0106a",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.message.from.id }}",
"rightValue": null
}
]
}
},
"typeVersion": 2.2
},
{
"id": "4355f058-2648-408f-ac1b-1b350b6aed10",
"name": "Send a text message",
"type": "n8n-nodes-base.telegram",
"position": [
440,
80
],
"parameters": {
"text": "I am sorry, you have no access to my services.",
"chatId": "={{ json.message.from.id }}",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "6035caa1-9b21-4401-a92f-5499b536b95d",
"name": "Whisper ASR HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"position": [
880,
-45
],
"parameters": {
"url": "http://localhost:9000/asr",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "audio_file",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "6bce3f08-cebf-4b45-9b5c-0cf098afbd96",
"name": "Send a text message1",
"type": "n8n-nodes-base.telegram",
"position": [
1696,
-120
],
"parameters": {
"text": "={{ $json.output }}",
"chatId": "",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "8dce296d-4991-42a0-a87f-bb00a1f6e2d1",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1320,
-120
],
"parameters": {
"text": "=You are my personal chatbot assistant.\nMy input: '{{ $json.message.text }}'.\nYour Answer: ",
"options": {},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "f476f17a-2be8-4573-a862-ae32162d3060",
"name": "Ollama Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
1348,
100
],
"parameters": {
"model": "llama3.2:1b",
"options": {}
},
"credentials": {
"ollamaApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "80e6b57c-bd5b-40f3-b6e8-f8014d68e04d",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1468,
100
],
"parameters": {
"sessionKey": "={{ $json.message.text }}",
"sessionIdType": "customKey",
"contextWindowLength": 2
},
"typeVersion": 1.3
},
{
"id": "bafa884d-00e4-4882-8a45-551ebaafeb57",
"name": "Rename Transcription Key",
"type": "n8n-nodes-base.renameKeys",
"position": [
1100,
-45
],
"parameters": {
"keys": {
"key": [
{
"newKey": "message.text",
"currentKey": "data"
}
]
},
"additionalOptions": {}
},
"typeVersion": 1
},
{
"id": "f2f41dd0-b1f7-4abc-8db4-6539dd1a2288",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-60,
-200
],
"parameters": {
"content": "## Telegram Trigger\nStart when Telegram message is received"
},
"typeVersion": 1
},
{
"id": "a02a2a95-6141-4e30-87eb-547c7a8228a3",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
260,
-300
],
"parameters": {
"content": "## IF\nDetect is message is sent by authorised user"
},
"typeVersion": 1
},
{
"id": "269b02bc-fb27-42a9-9d82-3708f359b812",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
600,
-260
],
"parameters": {
"content": "## Switch\nDetect if message is a text or audio message"
},
"typeVersion": 1
},
{
"id": "a2fcd43b-828b-472e-9a88-2c0f7b66b927",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
840,
140
],
"parameters": {
"content": "## Transcription\nTranscribe audio locally with Whisper API"
},
"typeVersion": 1
},
{
"id": "6da6c91c-9be4-4385-b93b-df5f12b4c305",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1320,
-300
],
"parameters": {
"content": "## AI Agent \nFormulate answer from AI Agent"
},
"typeVersion": 1
},
{
"id": "d9cb4fbc-cb85-4381-aa41-b6e548760e07",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1620,
-300
],
"parameters": {
"content": "## Telegram\nSend response to the user"
},
"typeVersion": 1
}
],
"active": true,
"settings": {
"callerPolicy": "workflowsFromSameOwner",
"executionOrder": "v1"
},
"versionId": "160c1b3b-9a50-44c7-93e3-dd29d0d547c8",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Send a text message1",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Get Voice File": {
"main": [
[
{
"node": "Whisper ASR HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Authorization Check If",
"type": "main",
"index": 0
}
]
]
},
"Ollama Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Message Type Switch": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Voice File",
"type": "main",
"index": 0
}
]
]
},
"Authorization Check If": {
"main": [
[
{
"node": "Message Type Switch",
"type": "main",
"index": 0
}
],
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
},
"Rename Transcription Key": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Whisper ASR HTTP Request": {
"main": [
[
{
"node": "Rename Transcription Key",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
ollamaApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Title: Create a Privacy-Focused AI Assistant with Telegram, Ollama, and Whisper
Source: https://n8n.io/workflows/6012/ — 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.
Digital marketers, content creators, social media managers, and businesses who want to use AI marketing automation for YouTube Shorts without spending hours on production. This AI workflow helps anyon
This automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos — all triggered from a simple Telegram chat and managed via Google Sheets.
Template Carnaval - time instagram. Uses toolWorkflow, lmChatOpenAi, memoryBufferWindow, agent. Event-driven trigger; 56 nodes.
AI-powered Telegram bot for effortless expense tracking. Send receipts, voice messages, or text - the bot automatically extracts and categorizes your expenses. 📸 Receipt & Invoice OCR - Send photos of
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.