{ "id": "ax8PJlp1UDb6EGFt", "meta": { "instanceId": "workflow-6a96e0b3", "versionId": "1.0.0", "createdAt": "2025-09-29T07:07:46.859658", "updatedAt": "2025-09-29T07:07:46.859672", "owner": "n8n-user", "license": "MIT", "category": "automation", "status": "active", "priority": "high", "environment": "production" }, "name": "Telegram AI Langchain bot", "tags": [ "automation", "n8n", "production-ready", "excellent", "optimized" ], "nodes": [ { "id": "e275f31f-6a5f-4444-8bf7-6c003a8e53df", "name": "OpenAI Chat Model", "type": "n8n-nodes-base.noOp", "position": [ 1100, 600 ], "parameters": { "model": "gpt-4-1106-preview", "options": { "temperature": 0.7, "frequencyPenalty": 0.2 } }, "credentials": { "openAiApi": { "id": "{{ $credentials.openAiApi.id }}", "name": "OpenAi account" } }, "typeVersion": 1, "notes": "This lmChatOpenAi node performs automated tasks as part of the workflow." }, { "id": "f25a6666-ff23-4372-afd0-4920a99aab6a", "name": "Window Buffer Memory", "type": "n8n-nodes-base.noOp", "position": [ 1220, 600 ], "parameters": { "sessionKey": "YOUR_CREDENTIAL_HERE", "contextWindowLength": 10 }, "typeVersion": 1, "notes": "This memoryBufferWindow node performs automated tasks as part of the workflow." }, { "id": "96faef5d-0349-47fe-a7cf-150953490e90", "name": "Telegram", "type": "n8n-nodes-base.telegram", "onError": "continueErrorOutput", "position": [ 1500, 380 ], "parameters": { "text": "={{ $json.output }}", "chatId": "={{ $('Listen for incoming events').first().json.message.from.id }}", "additionalFields": { "parse_mode": "HTML", "appendAttribution": false } }, "credentials": { "telegramApi": { "id": "{{ $credentials.telegramApi.id }}", "name": "Telegram sdfsdfsdfsdfsfd_bot" } }, "typeVersion": 1.1, "notes": "This telegram node performs automated tasks as part of the workflow." }, { "id": "5ad43039-aaa6-43cd-9b0f-1d02f4d9c4ff", "name": "Correct errors", "type": "n8n-nodes-base.telegram", "position": [ 1700, 380 ], "parameters": { "text": "={{ $('AI Agent').item.json.output.replace(/&/g, \"&\").replace(/>/g, \">\").replace(/bold, bold\nitalic, italic\nunderline, underline\nstrikethrough, strikethrough, strikethrough\nspoiler, spoiler\nbold italic bold italic bold strikethrough italic bold strikethrough spoiler underline italic bold bold\ninline URL\ninline fixed-width code\n
pre-formatted fixed-width code block
\n2. Any code that you send should be wrapped in these tags:
pre-formatted fixed-width code block written in the Python programming language
\nOther programming languages are supported as well.\n3. All <, > and & symbols that are not a part of a tag or an HTML entity must be replaced with the corresponding HTML entities (< with <, > with > and & with &)\n4. If the user sends you a message starting with / sign, it means this is a Telegram bot command. For example, all users send /start command as their first message. Try to figure out what these commands mean and reply accodringly\n" } }, "typeVersion": 1.1, "notes": "This agent node performs automated tasks as part of the workflow." } ], "active": true, "pinData": {}, "settings": { "callerPolicy": "workflowsFromSameOwner", "executionOrder": "v1", "saveManualExecutions": true, "saveDataSuccessExecution": "all", "errorWorkflow": null, "timezone": "UTC", "executionTimeout": 3600, "maxExecutions": 1000, "retryOnFail": true, "retryCount": 3, "retryDelay": 1000 }, "versionId": "3e9c27eb-1d2f-40bf-b284-4f6a1bece30c", "connections": { "39d532d3-8c96-4722-9cb0-cad92ff39e94": { "main": [ [ { "node": "error-handler-39d532d3-8c96-4722-9cb0-cad92ff39e94", "type": "main", "index": 0 } ], [ { "node": "error-handler-39d532d3-8c96-4722-9cb0-cad92ff39e94-5bc78b81", "type": "main", "index": 0 } ], [ { "node": "error-handler-39d532d3-8c96-4722-9cb0-cad92ff39e94-9aa1c171", "type": "main", "index": 0 } ], [ { "node": "error-handler-39d532d3-8c96-4722-9cb0-cad92ff39e94-010baf24", "type": "main", "index": 0 } ], [ { "node": "error-handler-39d532d3-8c96-4722-9cb0-cad92ff39e94-04242615", "type": "main", "index": 0 } ], [ { "node": "error-handler-39d532d3-8c96-4722-9cb0-cad92ff39e94-bb69bba1", "type": "main", "index": 0 } ], [ { "node": "error-handler-39d532d3-8c96-4722-9cb0-cad92ff39e94-822d70da", "type": "main", "index": 0 } ], [ { "node": "error-handler-39d532d3-8c96-4722-9cb0-cad92ff39e94-b6abfe4e", "type": "main", "index": 0 } ], [ { "node": "error-handler-39d532d3-8c96-4722-9cb0-cad92ff39e94-6ca99904", "type": "main", "index": 0 } ] ] }, "e275f31f-6a5f-4444-8bf7-6c003a8e53df": { "main": [ [ { "node": "error-handler-e275f31f-6a5f-4444-8bf7-6c003a8e53df-969bc906", "type": "main", "index": 0 } ] ] }, "96faef5d-0349-47fe-a7cf-150953490e90": { "main": [ [ { "node": "error-handler-96faef5d-0349-47fe-a7cf-150953490e90-632c3a34", "type": "main", "index": 0 } ] ] }, "5ad43039-aaa6-43cd-9b0f-1d02f4d9c4ff": { "main": [ [ { "node": "error-handler-5ad43039-aaa6-43cd-9b0f-1d02f4d9c4ff-da60074c", "type": "main", "index": 0 } ] ] }, "69a45c1f-838f-49ce-9b89-75db6a8b876f": { "main": [ [ { "node": "error-handler-69a45c1f-838f-49ce-9b89-75db6a8b876f-aa0973a0", "type": "main", "index": 0 } ] ] }, "2f5d5f25-9870-40d6-ad42-52750e62de63": { "main": [ [ { "node": "error-handler-2f5d5f25-9870-40d6-ad42-52750e62de63-7fa1e42c", "type": "main", "index": 0 } ] ] } }, "description": "Automated workflow: Telegram AI Langchain bot. This workflow integrates 11 different services: telegramTrigger, stickyNote, httpRequest, telegram, agent. It contains 19 nodes and follows best practices for error handling and security.", "notes": "Excellent quality workflow: Telegram AI Langchain bot. This workflow has been optimized for production use with comprehensive error handling, security, and documentation." }