This workflow follows the Chainllm → Google Sheets 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 →
{
"updatedAt": "2026-02-23T05:30:33.705Z",
"createdAt": "2026-02-13T17:48:09.578Z",
"id": "1PX3g7tYzcMEc785",
"name": "AI Chatbot-Frontend",
"active": true,
"isArchived": false,
"nodes": [
{
"parameters": {
"fieldsToAggregate": {
"fieldToAggregate": [
{}
]
},
"options": {}
},
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1,
"position": [
160,
0
],
"id": "bcc5d9bb-ec78-4641-922d-a04831a7122a",
"name": "Aggregate"
},
{
"parameters": {
"promptType": "=define",
"text": "=Anda adalah asisten analisis data PLN. HANYA gunakan data dari DATABASE di bawah ini. Jangan gunakan pengetahuan internal Anda tentang tahun 2024. Semua data di DATABASE adalah kejadian nyata tahun 2026.\n\nFORMAT OUTPUT (WAJIB):\nPantauan Media Sosial\n\nJudul Isu/Kejadian: [Tentukan berdasarkan Permintaan User]\n\nPeriode: [Sebutkan rentang tanggal dari kolom Tanggal di DATABASE]\n\nEksposur: [Sebutkan sumber berita dari kolom Sumber]\n\nSentimen: [Sebutkan persentase positif/negatif dari kolom Sentimen di DATABASE]\n\nPerkembangan Isu\n\n[Ringkasan dari kolom Konten_teks dan Ringkasan]\n\n[Sebutkan detail teknis jika ada di data]\n\n[Sebutkan upaya PLN dari data]\n\n[Sebutkan topik pembicaraan dari kolom Topik]\n\n[Sebutkan kesimpulan laporan]\n\nDATABASE UNTUK DIOLAH:\n{{ $node[\"Aggregate\"].json.all_items.map(i => \"Tanggal: \" + i.Tanggal + \" | Teks: \" + i.Konten_teks + \" | Sentimen: \" + i.Sentimen + \" | Sumber: \" + i.Sumber + \" | Topik: \" + i.Topik).join('\\n') }}\n\nPERMINTAAN USER:\n{{ $('Telegram Trigger').first().json.message.text }}",
"batching": {}
},
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.9,
"position": [
416,
0
],
"id": "cbb5aeb4-78c2-43ab-8778-a57ddab7633f",
"name": "Basic LLM Chain"
},
{
"parameters": {
"modelName": "models/gemma-3-27b-it",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"typeVersion": 1,
"position": [
416,
176
],
"id": "7179fab0-1faa-4e99-9af2-096d0a0d7007",
"name": "Google Gemini Chat Model",
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "={{ $('Basic LLM Chain').item.json.text }}",
"additionalFields": {}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
784,
0
],
"id": "65d907a5-1f74-46b9-8ded-cbdb24e3c522",
"name": "Send a text message",
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1.2,
"position": [
-304,
0
],
"id": "253d639c-d008-4ba1-85bf-0da4499318c4",
"name": "Telegram Trigger",
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1DMCQfuqBJdNvbfwKY-86aO3S0zFtpZ6_SL09UQ8yt8g",
"mode": "list",
"cachedResultName": "Database PLN",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DMCQfuqBJdNvbfwKY-86aO3S0zFtpZ6_SL09UQ8yt8g/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Sheet1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DMCQfuqBJdNvbfwKY-86aO3S0zFtpZ6_SL09UQ8yt8g/edit#gid=0"
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
-80,
0
],
"id": "f44c0247-e03d-4b2a-9754-133cbc101a17",
"name": "Get row(s) in sheet",
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Aggregate": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Get row(s) in sheet",
"type": "main",
"index": 0
}
]
]
},
"Get row(s) in sheet": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"binaryMode": "separate",
"availableInMCP": false
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"versionId": "0fb92c57-17eb-4bcc-afb6-d5324e3afb4f",
"activeVersionId": "f525f5cf-0e64-44ac-90b4-7b7e2ce6d336",
"triggerCount": 1,
"shared": [
{
"updatedAt": "2026-02-13T17:48:09.579Z",
"createdAt": "2026-02-13T17:48:09.579Z",
"role": "workflow:owner",
"workflowId": "1PX3g7tYzcMEc785",
"projectId": "Lw4fUBTO2lFMdRF0"
}
],
"activeVersion": {
"updatedAt": "2026-02-23T04:26:47.000Z",
"createdAt": "2026-02-23T04:23:36.846Z",
"versionId": "f525f5cf-0e64-44ac-90b4-7b7e2ce6d336",
"workflowId": "1PX3g7tYzcMEc785",
"nodes": [
{
"parameters": {
"fieldsToAggregate": {
"fieldToAggregate": [
{}
]
},
"options": {}
},
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1,
"position": [
160,
0
],
"id": "bcc5d9bb-ec78-4641-922d-a04831a7122a",
"name": "Aggregate"
},
{
"parameters": {
"promptType": "=define",
"text": "=Anda adalah asisten analisis data PLN. HANYA gunakan data dari DATABASE di bawah ini. Jangan gunakan pengetahuan internal Anda tentang tahun 2024. Semua data di DATABASE adalah kejadian nyata tahun 2026.\n\nFORMAT OUTPUT (WAJIB):\nPantauan Media Sosial\n\nJudul Isu/Kejadian: [Tentukan berdasarkan Permintaan User]\n\nPeriode: [Sebutkan rentang tanggal dari kolom Tanggal di DATABASE]\n\nEksposur: [Sebutkan sumber berita dari kolom Sumber]\n\nSentimen: [Sebutkan persentase positif/negatif dari kolom Sentimen di DATABASE]\n\nPerkembangan Isu\n\n[Ringkasan dari kolom Konten_teks dan Ringkasan]\n\n[Sebutkan detail teknis jika ada di data]\n\n[Sebutkan upaya PLN dari data]\n\n[Sebutkan topik pembicaraan dari kolom Topik]\n\n[Sebutkan kesimpulan laporan]\n\nDATABASE UNTUK DIOLAH:\n{{ $node[\"Aggregate\"].json.all_items.map(i => \"Tanggal: \" + i.Tanggal + \" | Teks: \" + i.Konten_teks + \" | Sentimen: \" + i.Sentimen + \" | Sumber: \" + i.Sumber + \" | Topik: \" + i.Topik).join('\\n') }}\n\nPERMINTAAN USER:\n{{ $('Telegram Trigger').first().json.message.text }}",
"batching": {}
},
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.9,
"position": [
416,
0
],
"id": "cbb5aeb4-78c2-43ab-8778-a57ddab7633f",
"name": "Basic LLM Chain"
},
{
"parameters": {
"modelName": "models/gemma-3-27b-it",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"typeVersion": 1,
"position": [
416,
176
],
"id": "7179fab0-1faa-4e99-9af2-096d0a0d7007",
"name": "Google Gemini Chat Model",
"credentials": {
"googlePalmApi": {
"id": "T7i4UTOOcUtmejqr",
"name": "Google Gemini(PaLM) Api account"
}
}
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "={{ $('Basic LLM Chain').item.json.text }}",
"additionalFields": {}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
784,
0
],
"id": "65d907a5-1f74-46b9-8ded-cbdb24e3c522",
"name": "Send a text message",
"webhookId": "6ecae2d8-a43a-4638-8bcf-6e311010a9e9",
"credentials": {
"telegramApi": {
"id": "ppwUEPCNgZQhqISi",
"name": "Telegram account"
}
}
},
{
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1.2,
"position": [
-304,
0
],
"id": "253d639c-d008-4ba1-85bf-0da4499318c4",
"name": "Telegram Trigger",
"webhookId": "942be13d-0762-42c7-9bf6-b435baa03be8",
"credentials": {
"telegramApi": {
"id": "ppwUEPCNgZQhqISi",
"name": "Telegram account"
}
}
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1DMCQfuqBJdNvbfwKY-86aO3S0zFtpZ6_SL09UQ8yt8g",
"mode": "list",
"cachedResultName": "Database PLN",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DMCQfuqBJdNvbfwKY-86aO3S0zFtpZ6_SL09UQ8yt8g/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Sheet1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DMCQfuqBJdNvbfwKY-86aO3S0zFtpZ6_SL09UQ8yt8g/edit#gid=0"
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
-80,
0
],
"id": "f44c0247-e03d-4b2a-9754-133cbc101a17",
"name": "Get row(s) in sheet",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "H1TzRBBRBR1Xx9No",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "5aa0639d-ced4-415f-be01-3c304b8895c4",
"leftValue": "={{ $json.Konten_teks }}",
"rightValue": "={{ $('Telegram Trigger').first().json.message.text }}",
"operator": {
"type": "string",
"operation": "contains"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.3,
"position": [
-304,
272
],
"id": "958686a9-048e-43a2-a489-e4d8c8d1a8c8",
"name": "Filter"
}
],
"connections": {
"Aggregate": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Get row(s) in sheet",
"type": "main",
"index": 0
}
]
]
},
"Get row(s) in sheet": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Filter": {
"main": [
[]
]
}
},
"authors": "PLN TEKKOM",
"name": "Bot PLN",
"description": "",
"autosaved": true
},
"tags": []
}
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.
googlePalmApigoogleSheetsOAuth2ApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
AI Chatbot-Frontend. Uses chainLlm, lmChatGoogleGemini, telegram, telegramTrigger. Event-driven trigger; 6 nodes.
Source: https://github.com/SamVivan1/n8n-Workflows-Backup/blob/main/ai-chatbot-frontend-1PX3g7tYzcMEc785.json — 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.
Bot Gambar. Uses telegramTrigger, lmChatOpenRouter, googleSheets, telegram. Event-driven trigger; 74 nodes.
This comprehensive N8N automation template revolutionizes content creation by delivering a complete end-to-end solution for AI-powered blog generation. Transform simple ideas into fully SEO-optimized,
DailyQuote. Uses scheduleTrigger, httpRequest, telegram, chainLlm. Scheduled trigger; 17 nodes.
Send any URL to your Telegram bot and get an AI summary instantly.
End-to-End Video Creation from user idea or transcript AI-Powered Scriptwriting using LLMs (e.g., DeepSeek via OpenRouter) Voiceover Generation with customizable TTS voices Image Scene Generation usin