
Transcribe-Telegram-Template
่ชฌๆ
Categories
๐ค AI & Machine Learning
Nodes Used
n8n-nodes-base.ifn8n-nodes-base.ifn8n-nodes-base.ifn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.coden8n-nodes-base.switchn8n-nodes-base.telegram
Price็กๆ
Views0
ๆ็ตๆดๆฐ11/28/2025
workflow.json
{
"id": "VSZa9w1RI0u5BNbS",
"meta": {
"instanceId": "abeb4de6795125f40ad5de96d2a952a3dd8b9999a00fda0c983edb96a5a49cc6",
"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
],
"webhookId": "0a9f1937-94e7-414a-9423-4a13f13a9d55",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "HJQKfpYJoO6wuDRR",
"name": "Test"
}
},
"typeVersion": 1.2
},
{
"id": "8c61835a-5026-45f8-95f0-31283f399ae8",
"name": "MSG - Starting transcription. Please wait.",
"type": "n8n-nodes-base.telegram",
"position": [
48,
-288
],
"webhookId": "2e248958-2d66-43b6-8d1a-e0e70ed48d1f",
"parameters": {
"text": "Starting transcription. Please wait.",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "HJQKfpYJoO6wuDRR",
"name": "Test"
}
},
"typeVersion": 1.2
},
{
"id": "ef8b3ab0-8aa2-4b3f-bd13-a574d486e05f",
"name": "MSG - Access denied!",
"type": "n8n-nodes-base.telegram",
"position": [
-1152,
352
],
"webhookId": "e828b75b-3f44-4493-8255-d9df3f75684f",
"parameters": {
"text": "Access denied!",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "HJQKfpYJoO6wuDRR",
"name": "Test"
}
},
"typeVersion": 1.2
},
{
"id": "c6b800a7-98cd-4a69-9752-2bd81ca1ff6f",
"name": "MSG - No file!",
"type": "n8n-nodes-base.telegram",
"position": [
-768,
352
],
"webhookId": "2040825e-7ae5-46d5-9dc8-55fc8f1b864e",
"parameters": {
"text": "No file!",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "HJQKfpYJoO6wuDRR",
"name": "Test"
}
},
"typeVersion": 1.2
},
{
"id": "7291c581-6478-4911-a440-538bace43595",
"name": "Get File GPT",
"type": "n8n-nodes-base.telegram",
"position": [
-224,
-80
],
"webhookId": "1ed2ed8a-f8fe-4960-8da7-523b0603f172",
"parameters": {
"fileId": "={{ $json.file_id }}",
"resource": "file",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "HJQKfpYJoO6wuDRR",
"name": "Test"
}
},
"typeVersion": 1.2,
"alwaysOutputData": false
},
{
"id": "39256ede-db0e-4e8a-8f38-746dd6c64810",
"name": "Get File Gemini",
"type": "n8n-nodes-base.telegram",
"position": [
192,
192
],
"webhookId": "03966b0b-973f-40c7-b110-ed803ce6605e",
"parameters": {
"fileId": "={{ $('Get File GPT').item.json.result.file_id }}",
"resource": "file",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "HJQKfpYJoO6wuDRR",
"name": "Test"
}
},
"typeVersion": 1.2,
"alwaysOutputData": false
},
{
"id": "3a259e3c-d7a4-41fc-9d4a-a7fef83ce477",
"name": "MSG - File not recognized",
"type": "n8n-nodes-base.telegram",
"position": [
-240,
352
],
"webhookId": "32096d61-d73f-4819-898a-02b68e50d133",
"parameters": {
"text": "File not recognized",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "HJQKfpYJoO6wuDRR",
"name": "Test"
}
},
"typeVersion": 1.2
},
{
"id": "0b3d30b7-3ae9-4aa5-af74-efb25fe33e0a",
"name": "MSG - Output",
"type": "n8n-nodes-base.telegram",
"position": [
896,
-192
],
"webhookId": "7e85bc7a-bb0c-4da5-bbaf-3a5db1c7b4ee",
"parameters": {
"text": "={{ $json.text }}",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "HJQKfpYJoO6wuDRR",
"name": "Test"
}
},
"typeVersion": 1.2
},
{
"id": "95019c94-e034-4ef2-bdf4-5c6f906a8309",
"name": "MSG - Output with chunking",
"type": "n8n-nodes-base.telegram",
"position": [
1216,
208
],
"webhookId": "7c996c0a-9b70-4391-b877-a68f9342353d",
"parameters": {
"text": "={{ $json.body }}",
"chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "HJQKfpYJoO6wuDRR",
"name": "Test"
}
},
"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๐๏ธ Voice Transcription Flow โ Quick Guide\n\n**Telegram Trigger** โ receives voice messages, audio files, or text from users.\n\n**Sender Verification** โ checks if the sender is authorized to use the transcription service.\n - โ
Authorized โ workflow continues.\n - โ Not authorized โ sends \"Access denied\" message and stops.\n\n**Audio Type Detection** โ identifies message type (voice note, audio file, or text).\n - If no audio detected โ sends \"No audio file found\" message.\n - If audio detected โ proceeds to format validation.\n\n**File Format Check** โ validates audio format (OGG, MP3, MP4, M4A).\n - Recognized format โ downloads file and proceeds to transcription.\n - Unrecognized format โ sends \"File format not recognized\" message.\n\n**OpenAI Transcription** โ primary transcription using Whisper API.\n - Success โ assigns transcribed text and proceeds.\n - Error โ triggers Gemini fallback.\n\n**Gemini Fallback** โ backup transcription if OpenAI fails.\n\n**Text Length Handler** โ checks if transcription exceeds 4,000 characters.\n - more than 4,000 chars โ sends directly to Telegram.\n - over than 4,000 chars โ splits into chunks and sends sequentially.\n\n๐ก 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": {
"id": "mILSsq03xGUAjYqe",
"name": "Test"
}
},
"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": {
"id": "4fkTqSVMFBOr1i2z",
"name": "Test"
}
},
"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\"]; // ะฐะฑะพ ะดะต ัะฒัะน ัะตะบัั\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,
"pinData": {},
"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": [
[]
]
}
}
}