This workflow corresponds to n8n.io template #9625 — we link there as the canonical source.
This workflow follows the Googlegemini → Telegram 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": "VSZa9w1RI0u5BNbS",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Transcribe-Telegram-Template",
"tags": [],
"nodes": [
{
"id": "b5b09a51-d67f-4ce9-9d68-f7a7a7e5b740",
"name": "Telegram Trigger1",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-1536,
80
],
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "8c61835a-5026-45f8-95f0-31283f399ae8",
"name": "MSG - Starting transcription. Please wait.",
"type": "n8n-nodes-base.telegram",
"position": [
48,
-288
],
"parameters": {
"text": "Starting transcription. Please wait.",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "ef8b3ab0-8aa2-4b3f-bd13-a574d486e05f",
"name": "MSG - Access denied!",
"type": "n8n-nodes-base.telegram",
"position": [
-1152,
352
],
"parameters": {
"text": "Access denied!",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "c6b800a7-98cd-4a69-9752-2bd81ca1ff6f",
"name": "MSG - No file!",
"type": "n8n-nodes-base.telegram",
"position": [
-768,
352
],
"parameters": {
"text": "No file!",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "7291c581-6478-4911-a440-538bace43595",
"name": "Get File GPT",
"type": "n8n-nodes-base.telegram",
"position": [
-224,
-80
],
"parameters": {
"fileId": "={{ $json.file_id }}",
"resource": "file",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2,
"alwaysOutputData": false
},
{
"id": "39256ede-db0e-4e8a-8f38-746dd6c64810",
"name": "Get File Gemini",
"type": "n8n-nodes-base.telegram",
"position": [
192,
192
],
"parameters": {
"fileId": "={{ $('Get File GPT').item.json.result.file_id }}",
"resource": "file",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2,
"alwaysOutputData": false
},
{
"id": "3a259e3c-d7a4-41fc-9d4a-a7fef83ce477",
"name": "MSG - File not recognized",
"type": "n8n-nodes-base.telegram",
"position": [
-240,
352
],
"parameters": {
"text": "File not recognized",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "0b3d30b7-3ae9-4aa5-af74-efb25fe33e0a",
"name": "MSG - Output",
"type": "n8n-nodes-base.telegram",
"position": [
896,
-192
],
"parameters": {
"text": "={{ $json.text }}",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "95019c94-e034-4ef2-bdf4-5c6f906a8309",
"name": "MSG - Output with chunking",
"type": "n8n-nodes-base.telegram",
"position": [
1216,
208
],
"parameters": {
"text": "={{ $json.body }}",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "7f5d77be-0300-4927-ac47-9da660bc73fb",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1344,
-64
],
"parameters": {
"width": 352,
"height": 352,
"content": "## Access permission"
},
"typeVersion": 1
},
{
"id": "e1294272-66fe-4003-aa08-b000d8bd92cf",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-960,
-64
],
"parameters": {
"width": 464,
"height": 352,
"content": "## Recognition of record type"
},
"typeVersion": 1
},
{
"id": "33e9e4c1-b194-4985-ac68-dde11002b5d8",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-480,
304
],
"parameters": {
"width": 464,
"height": 192,
"content": "## File not recognized message\n"
},
"typeVersion": 1
},
{
"id": "f80bbb05-c782-484f-8998-dfe4acf78fbe",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-960,
304
],
"parameters": {
"width": 464,
"height": 192,
"content": "## File not found message"
},
"typeVersion": 1
},
{
"id": "7a86366b-fd42-42ee-bbb6-b30126b292bc",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1344,
304
],
"parameters": {
"width": 352,
"height": 192,
"content": "## Access denied message\n"
},
"typeVersion": 1
},
{
"id": "52ea9f97-e3f1-42f7-a472-8a8e3001e254",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-288,
-176
],
"parameters": {
"height": 240,
"content": "## Get a file for transcribe by GPT\n"
},
"typeVersion": 1
},
{
"id": "97c746b5-93ff-44dc-b4dd-f4cd8f7cf4d1",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
-400
],
"parameters": {
"height": 272,
"content": "## notification of commencement of work"
},
"typeVersion": 1
},
{
"id": "d0e8341f-c82d-40b9-a2bb-7676b98a3cb7",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
64
],
"parameters": {
"width": 432,
"height": 304,
"content": "## If transcription via GPT fails, we start doing it via Gemini."
},
"typeVersion": 1
},
{
"id": "8ac65c15-9774-4d5a-8f99-903e00698311",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
816,
-320
],
"parameters": {
"width": 272,
"height": 288,
"content": "## Send the result if the text is less than 4000 characters"
},
"typeVersion": 1
},
{
"id": "9eff7515-a915-4a37-82c3-7b77011e3671",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
816,
48
],
"parameters": {
"width": 288,
"height": 320,
"content": "## if the text is longer than 4000 characters, we split it into parts"
},
"typeVersion": 1
},
{
"id": "dd08756a-fe21-4b32-a84d-4658d302f02f",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
1152,
48
],
"parameters": {
"width": 288,
"height": 320,
"content": "## sending parts of a message"
},
"typeVersion": 1
},
{
"id": "6619e9f6-a42a-4efc-af5d-3778be5b3541",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2256,
-144
],
"parameters": {
"color": 2,
"width": 640,
"height": 640,
"content": "## Description\n\ud83c\udf99\ufe0f Voice Transcription Flow \u2014 Quick Guide\n\n**Telegram Trigger** \u2014 receives voice messages, audio files, or text from users.\n\n**Sender Verification** \u2014 checks if the sender is authorized to use the transcription service.\n - \u2705 Authorized \u2192 workflow continues.\n - \u274c Not authorized \u2192 sends \"Access denied\" message and stops.\n\n**Audio Type Detection** \u2014 identifies message type (voice note, audio file, or text).\n - If no audio detected \u2192 sends \"No audio file found\" message.\n - If audio detected \u2192 proceeds to format validation.\n\n**File Format Check** \u2014 validates audio format (OGG, MP3, MP4, M4A).\n - Recognized format \u2192 downloads file and proceeds to transcription.\n - Unrecognized format \u2192 sends \"File format not recognized\" message.\n\n**OpenAI Transcription** \u2014 primary transcription using Whisper API.\n - Success \u2192 assigns transcribed text and proceeds.\n - Error \u2192 triggers Gemini fallback.\n\n**Gemini Fallback** \u2014 backup transcription if OpenAI fails.\n\n**Text Length Handler** \u2014 checks if transcription exceeds 4,000 characters.\n - more than 4,000 chars \u2192 sends directly to Telegram.\n - over than 4,000 chars \u2192 splits into chunks and sends sequentially.\n\n\ud83d\udca1 Use case:\nPerfect for teams that need to convert voice messages into searchable text records while maintaining security and handling various audio formats automatically."
},
"typeVersion": 1
},
{
"id": "84de2b59-5476-4350-8377-060ec83c4b2b",
"name": "Sticky Note13",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2256,
-592
],
"parameters": {
"color": 2,
"width": 640,
"height": 416,
"content": "## [Video Tutorial](https://youtu.be/ckXszQCkncM)\n@[youtube](ckXszQCkncM)"
},
"typeVersion": 1
},
{
"id": "3b36c7c4-ac75-4156-84ac-07a8133b9d97",
"name": "Access Check",
"type": "n8n-nodes-base.if",
"position": [
-1328,
80
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "4a6f724e-00ca-4e3a-9348-ca0c4485a6cb",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.message.from.username }}",
"rightValue": "User 2"
},
{
"id": "3eb097c7-37bb-40ee-9c9a-faec6ec296ef",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.message.from.username }}",
"rightValue": "User 1"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "8a7fb6d8-7264-44db-a7f7-3515920ef859",
"name": "Determining The Type Of Document",
"type": "n8n-nodes-base.switch",
"position": [
-944,
48
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Voice",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "27b41a26-b098-41a6-84a4-298c272f2aac",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.voice }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "Audio",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "53e7b9a8-f6df-483e-94d5-9bcff0605057",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.audio }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"typeVersion": 3.2,
"alwaysOutputData": false
},
{
"id": "db156b5f-0947-4d61-b41d-46df405dddf7",
"name": "Assigning file_id For Voice",
"type": "n8n-nodes-base.set",
"position": [
-656,
-16
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cff9b35a-94c1-49cd-82d3-1aa99784ecf4",
"name": "file_id",
"type": "string",
"value": "={{ $json.message.voice.file_id }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "c1e997b9-7b90-4a6a-9c12-4a79c56b6781",
"name": "Assigning file_id For Audio",
"type": "n8n-nodes-base.set",
"position": [
-656,
160
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cff9b35a-94c1-49cd-82d3-1aa99784ecf4",
"name": "file_id",
"type": "string",
"value": "={{ $json.message.audio.file_id }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "607d8c2a-692b-492d-a465-9b7570b6a403",
"name": "Transcription Decision Node",
"type": "n8n-nodes-base.if",
"position": [
-464,
64
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "efcf6a8d-cfc5-4e38-bbfc-87054a07b7d2",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Telegram Trigger1').item.json.message.voice.mime_type }}",
"rightValue": "audio/ogg"
},
{
"id": "358d4782-b3cb-4695-b9ad-b28ec7e0517b",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Telegram Trigger1').item.json.message.voice.mime_type }}",
"rightValue": "audio/mpeg"
},
{
"id": "c550c35e-0058-4e0b-bb36-579ad814362a",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Telegram Trigger1').item.json.message.audio.mime_type }}",
"rightValue": "audio/mpeg"
},
{
"id": "abca7dbd-0f40-4d83-a8d4-491ccc983701",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Telegram Trigger1').item.json.message.audio.mime_type }}",
"rightValue": "audio/mp4"
},
{
"id": "07cec6d3-b276-4a77-89b3-0e4ffc005e3a",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Telegram Trigger1').item.json.message.audio.mime_type }}",
"rightValue": "audio/m4a"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "3b947ce9-4c2b-402e-87c5-7fd2c5095dcf",
"name": "Transcription by OpenAi",
"type": "@n8n/n8n-nodes-langchain.openAi",
"onError": "continueErrorOutput",
"position": [
32,
-80
],
"parameters": {
"options": {},
"resource": "audio",
"operation": "transcribe"
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8,
"alwaysOutputData": false
},
{
"id": "7a1053ad-f073-432d-994f-dc2962b88527",
"name": "Transcription by Gemini",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
352,
192
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"resource": "audio",
"inputType": "binary",
"binaryPropertyName": "=data"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "3db744c6-ffd5-4950-9e8e-14d1a156f7ff",
"name": "Assignment of variable TEXT",
"type": "n8n-nodes-base.set",
"position": [
496,
-96
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "a38b0a02-febd-4fbb-a43c-cf88a3ec52ee",
"name": "text",
"type": "string",
"value": "={{ $json.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "62dca117-1c3a-4ca8-90e9-42c958385dd8",
"name": "Assignment of variable TEXT1",
"type": "n8n-nodes-base.set",
"position": [
496,
192
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "a38b0a02-febd-4fbb-a43c-cf88a3ec52ee",
"name": "text",
"type": "string",
"value": "={{ $json.content.parts[0].text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "14e4417b-77fd-461b-9802-0b3b82769138",
"name": "Checking the length of a message",
"type": "n8n-nodes-base.if",
"position": [
672,
16
],
"parameters": {
"options": {
"ignoreCase": false
},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "1ea96016-10c2-4acd-8998-f059de847ff9",
"operator": {
"type": "number",
"operation": "lt"
},
"leftValue": "={{ $json[\"text\"].length }}",
"rightValue": 4000
}
]
}
},
"typeVersion": 2.2
},
{
"id": "e42cece4-79d1-47fb-90b7-d863d42801da",
"name": "Text Division",
"type": "n8n-nodes-base.code",
"position": [
880,
208
],
"parameters": {
"jsCode": "const input = $json[\"text\"]; // \u0430\u0431\u043e \u0434\u0435 \u0442\u0432\u0456\u0439 \u0442\u0435\u043a\u0441\u0442\nconst chunkSize = 4000;\n\nconst chunks = [];\nfor (let i = 0; i < input.length; i += chunkSize) {\n chunks.push({ body: input.substring(i, i + chunkSize) });\n}\n\nreturn chunks.map(chunk => ({\n json: chunk\n}));\n"
},
"typeVersion": 2
}
],
"active": false,
"settings": {
"callerPolicy": "workflowsFromSameOwner",
"errorWorkflow": "x9AXxSMhwpuoJ3Qy",
"executionOrder": "v1"
},
"versionId": "2c1b61ca-a3e1-47db-af95-959aaf4857a2",
"connections": {
"Access Check": {
"main": [
[
{
"node": "Determining The Type Of Document",
"type": "main",
"index": 0
}
],
[
{
"node": "MSG - Access denied!",
"type": "main",
"index": 0
}
]
]
},
"Get File GPT": {
"main": [
[
{
"node": "Transcription by OpenAi",
"type": "main",
"index": 0
},
{
"node": "MSG - Starting transcription. Please wait.",
"type": "main",
"index": 0
}
]
]
},
"Text Division": {
"main": [
[
{
"node": "MSG - Output with chunking",
"type": "main",
"index": 0
}
]
]
},
"Get File Gemini": {
"main": [
[
{
"node": "Transcription by Gemini",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger1": {
"main": [
[
{
"node": "Access Check",
"type": "main",
"index": 0
}
]
]
},
"Transcription by Gemini": {
"main": [
[
{
"node": "Assignment of variable TEXT1",
"type": "main",
"index": 0
}
]
]
},
"Transcription by OpenAi": {
"main": [
[
{
"node": "Assignment of variable TEXT",
"type": "main",
"index": 0
}
],
[
{
"node": "Get File Gemini",
"type": "main",
"index": 0
}
]
]
},
"Assigning file_id For Audio": {
"main": [
[
{
"node": "Transcription Decision Node",
"type": "main",
"index": 0
}
]
]
},
"Assigning file_id For Voice": {
"main": [
[
{
"node": "Transcription Decision Node",
"type": "main",
"index": 0
}
]
]
},
"Assignment of variable TEXT": {
"main": [
[
{
"node": "Checking the length of a message",
"type": "main",
"index": 0
}
]
]
},
"Transcription Decision Node": {
"main": [
[
{
"node": "Get File GPT",
"type": "main",
"index": 0
}
],
[
{
"node": "MSG - File not recognized",
"type": "main",
"index": 0
}
]
]
},
"Assignment of variable TEXT1": {
"main": [
[
{
"node": "Checking the length of a message",
"type": "main",
"index": 0
}
]
]
},
"Checking the length of a message": {
"main": [
[
{
"node": "MSG - Output",
"type": "main",
"index": 0
}
],
[
{
"node": "Text Division",
"type": "main",
"index": 0
}
]
]
},
"Determining The Type Of Document": {
"main": [
[
{
"node": "Assigning file_id For Voice",
"type": "main",
"index": 0
}
],
[
{
"node": "Assigning file_id For Audio",
"type": "main",
"index": 0
}
],
[
{
"node": "MSG - No file!",
"type": "main",
"index": 0
}
]
]
},
"MSG - Starting transcription. Please wait.": {
"main": [
[]
]
}
}
}
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.
googlePalmApiopenAiApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This n8n workflow enables automated transcription of voice messages in Telegram groups with built-in access control and intelligent fallback mechanisms. It's designed for teams that need to convert audio messages to text while maintaining security and handling various audio…
Source: https://n8n.io/workflows/9625/ — 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.
Ask questions like “How much did I spend on food last month?” and get instant answers from your financial data — directly in Telegram.
Build a Telegram bot that helps users find AliExpress products using natural language requests. The bot uses OpenAI to optimize search queries, Decodo to scrape product listings, and AI analysis to se
Voice Note -> Veo 3 AD. Uses telegramTrigger, telegram, openAi, httpRequest. Event-driven trigger; 49 nodes.
Most expense tracker apps (like Money Lover, Spendee, or Wallet) have a common friction point: Data Entry. You have to unlock your phone, find the app, wait for it to load, navigate menus, and manuall
> ⚠️ Disclaimer: This workflow uses Community Nodes and must be run on a self-hosted instance of n8n.