{
"id": "SimpleTgAiBotLite",
"active": false,
"name": "Simple Telegram AI Bot (Lite)",
"nodes": [
{
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"id": "c3000000-0000-4000-8000-000000000001",
"name": "Telegram Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1.2,
"position": [
-380,
0
],
"webhookId": "simple-ai-bot-inbound",
"credentials": {}
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.message.text }}",
"options": {
"systemMessage": "You are a friendly, concise assistant for a small business. Keep answers under 120 words. Reply in the customer's language. If you are not sure about business-specific facts (prices, policies, hours), say you'll check with the team instead of guessing."
}
},
"id": "c3000000-0000-4000-8000-000000000002",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.9,
"position": [
-100,
0
]
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"id": "c3000000-0000-4000-8000-000000000003",
"name": "Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-160,
200
],
"credentials": {}
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"contextWindowLength": 10
},
"id": "c3000000-0000-4000-8000-000000000004",
"name": "Chat Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
0,
200
]
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "={{ $json.output }}",
"additionalFields": {}
},
"id": "c3000000-0000-4000-8000-000000000005",
"name": "Send Reply",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
180,
0
],
"credentials": {}
}
],
"connections": {
"Telegram Trigger": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Send Reply",
"type": "main",
"index": 0
}
]
]
},
"Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Chat Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": false
}
}