This workflow follows the Chainretrievalqa → Retrievervectorstore 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 →
{
"name": "bug_reporter",
"nodes": [
{
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1.2,
"position": [
-740,
40
],
"id": "19ede701-70a3-4faf-a30e-2a89e7811c9e",
"name": "Telegram Trigger",
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.query }}",
"options": {
"systemPromptTemplate": "# \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\n\u0422\u044b - \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u0443 \u0431\u0430\u0433\u043e\u0432 \u0432 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0445 \u0438\u0433\u0440\u0430\u0445 \u0432 \u0431\u0430\u0437\u0435 \u043f\u043e \u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c.\n\n# \u0417\u0430\u0434\u0430\u0447\u0438\n\u0422\u044b \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0441\u043a\u0430\u0442\u044c \u0431\u0430\u0433\u0438 \u043f\u043e \u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c \u0432 \u044d\u0442\u043e\u0439 \u0431\u0430\u0437\u0435. \u0422\u0435\u0431\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0431\u0430\u0433. \u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0433\u0430 \u0438 \u0435\u0433\u043e \u0442\u0435\u043a\u0441\u0442, \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0439 \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e.\n\n# \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\n\u0415\u0441\u043b\u0438 \u0432\u0438\u0434\u0438\u0448\u044c, \u0447\u0442\u043e \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e, \u043e\u0442\u0432\u0435\u0447\u0430\u0439 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: \"\u0411\u0430\u0433 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u0432 \u0431\u0430\u0437\u0435, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0442\u043e\u0447\u043d\u0435\u0435\". \u041f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e, \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0435\u0435\u0441\u044f \u043a \u0431\u0430\u0437\u0435, \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e\n----------------\nContext: {context}"
}
},
"type": "@n8n/n8n-nodes-langchain.chainRetrievalQa",
"typeVersion": 1.6,
"position": [
-504,
700
],
"id": "592ec1ca-8743-4588-a46c-13075041bdf8",
"name": "Question and Answer Chain"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "53a1b237-c869-42eb-866f-5dfab61b3657",
"name": "query",
"value": "={{ $json.message.text }}",
"type": "string"
},
{
"id": "e7f647d0-d2e7-4524-95bd-ceb6519dfa29",
"name": "chat_id",
"value": "={{ $json.message.from.id }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-740,
700
],
"id": "6178a1b6-f865-422f-81c5-2da0ea8d8414",
"name": "Set Query"
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-520,
920
],
"id": "09df127a-6c53-4aaf-b228-03a5c44d896d",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"topK": 2
},
"type": "@n8n/n8n-nodes-langchain.retrieverVectorStore",
"typeVersion": 1,
"position": [
-400,
922.5
],
"id": "0d9a48c9-1252-43d0-ac60-87b6914dd440",
"name": "Vector Store Retriever"
},
{
"parameters": {
"pineconeIndex": {
"__rl": true,
"value": "bug-index",
"mode": "list",
"cachedResultName": "bug-index"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"typeVersion": 1.2,
"position": [
-400,
1120
],
"id": "72fc2cf5-5873-4e53-9084-64af96133374",
"name": "Pinecone Vector Store",
"credentials": {
"pineconeApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"options": {
"dimensions": 1536,
"timeout": -1
}
},
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"typeVersion": 1.2,
"position": [
-312,
1315
],
"id": "1c3201c9-f09b-41f2-b495-865e8d110349",
"name": "Embeddings OpenAI",
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"chatId": "={{ $('Set Query').item.json.chat_id }}",
"text": "={{ $json.response }}",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
-24,
700
],
"id": "95701549-4d08-46b5-a889-7dc48aae6fd4",
"name": "Telegram",
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "53a1b237-c869-42eb-866f-5dfab61b3657",
"name": "query",
"value": "={{ $json.message.text }}",
"type": "string"
},
{
"id": "e7f647d0-d2e7-4524-95bd-ceb6519dfa29",
"name": "chat_id",
"value": "={{ $json.message.from.id }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-520,
40
],
"id": "93de63c3-496c-4448-af71-438217581be4",
"name": "Set Query1"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "loose",
"version": 2
},
"conditions": [
{
"id": "2f64daab-3afa-4616-8b5b-873782b6eec6",
"leftValue": "={{ $json.result.hits[0]._score }}",
"rightValue": 0.3,
"operator": {
"type": "number",
"operation": "gte"
}
}
],
"combinator": "and"
},
"looseTypeValidation": true,
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
-80,
40
],
"id": "f78c789e-d6f9-46b6-9139-0fd2d5063aa3",
"name": "If",
"alwaysOutputData": false
},
{
"parameters": {
"authentication": "serviceAccount",
"operation": "append",
"documentId": {
"__rl": true,
"value": "1II4qXZGukoIHHfvhz2fPEheIRw3UNJ2YEHfiQ38S2c0",
"mode": "list",
"cachedResultName": "Bug reports",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1II4qXZGukoIHHfvhz2fPEheIRw3UNJ2YEHfiQ38S2c0/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Log",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1II4qXZGukoIHHfvhz2fPEheIRw3UNJ2YEHfiQ38S2c0/edit#gid=0"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"chat_id": "={{ $('Set Query1').item.json.chat_id }}",
"datetime": "={{ $now }}",
"status": "0",
"query": "={{ $('Set Query1').item.json.query }}",
"answer": "={{ $('Search in Pinecone').item.json.result.hits[0].fields.text }}",
"score": "={{ $('Search in Pinecone').item.json.result.hits[0]._score }}"
},
"matchingColumns": [],
"schema": [
{
"id": "query",
"displayName": "query",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "answer",
"displayName": "answer",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "score",
"displayName": "score",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "status",
"displayName": "status",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "chat_id",
"displayName": "chat_id",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "datetime",
"displayName": "datetime",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.6,
"position": [
360,
-60
],
"id": "4932424d-b1dd-4131-8274-4c0bff5463f0",
"name": "Log success",
"credentials": {
"googleApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"method": "POST",
"url": "https://bugs-index-602cj32.svc.aped-4627-b74a.pinecone.io/records/namespaces/__default__/search",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "X-Pinecone-API-Version",
"value": "unstable"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"query\": {\n \"inputs\": {\"text\": {{ JSON.stringify($json.query)}} },\n \"top_k\": 1\n },\n \"fields\": [\"text\", \"title\"]\n }",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-300,
40
],
"id": "e075d1a2-cae7-4045-b56c-c2c6cd7dbdc8",
"name": "Search in Pinecone",
"retryOnFail": true,
"maxTries": 2,
"waitBetweenTries": 3000,
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"onError": "continueErrorOutput"
},
{
"parameters": {
"chatId": "={{ $('Set Query1').item.json.chat_id }}",
"text": "={{ $('Search in Pinecone').item.json.result.hits[0].fields.text }}",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
140,
-60
],
"id": "92e919df-642b-433c-94cd-5451b67fdff3",
"name": "Send answer",
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"chatId": "={{ $('Set Query1').item.json.chat_id }}",
"text": "\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0431\u0430\u0433\u0435 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
140,
140
],
"id": "2e82c9c8-1a51-4d8c-92cb-64af4ae367af",
"name": "Send not found",
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"authentication": "serviceAccount",
"operation": "append",
"documentId": {
"__rl": true,
"value": "1II4qXZGukoIHHfvhz2fPEheIRw3UNJ2YEHfiQ38S2c0",
"mode": "list",
"cachedResultName": "Bug reports",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1II4qXZGukoIHHfvhz2fPEheIRw3UNJ2YEHfiQ38S2c0/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Log",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1II4qXZGukoIHHfvhz2fPEheIRw3UNJ2YEHfiQ38S2c0/edit#gid=0"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"query": "={{ $('Set Query1').item.json.query }}",
"chat_id": "={{ $('Set Query1').item.json.chat_id }}",
"datetime": "={{ $now }}",
"status": "1",
"answer": "={{ $json.result.text }}",
"score": "={{ $('Search in Pinecone').item.json.result.hits[0]._score }}"
},
"matchingColumns": [],
"schema": [
{
"id": "query",
"displayName": "query",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "answer",
"displayName": "answer",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "score",
"displayName": "score",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "status",
"displayName": "status",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "chat_id",
"displayName": "chat_id",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "datetime",
"displayName": "datetime",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.6,
"position": [
360,
140
],
"id": "dab84874-3da3-43f0-9c65-50795787777d",
"name": "Log not found",
"credentials": {
"googleApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"workflowId": {
"__rl": true,
"value": "I9IxB9Unw6CkFsMY",
"mode": "list",
"cachedResultName": "bug_reporter_database_error_log"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {},
"matchingColumns": [],
"schema": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
},
"options": {}
},
"type": "n8n-nodes-base.executeWorkflow",
"typeVersion": 1.2,
"position": [
-120,
320
],
"id": "d2eae615-75c5-4905-baf5-ee6af18fd0f7",
"name": "Execute Workflow",
"executeOnce": true
},
{
"parameters": {
"content": "## Second version with external LLM for embedding and answering",
"height": 800,
"width": 1560
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-1200,
640
],
"typeVersion": 1,
"id": "b2c208d5-4799-4183-b6fe-a3f8653e21ef",
"name": "Sticky Note"
}
],
"connections": {
"Telegram Trigger": {
"main": [
[
{
"node": "Set Query1",
"type": "main",
"index": 0
}
]
]
},
"Set Query": {
"main": [
[
{
"node": "Question and Answer Chain",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Question and Answer Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Vector Store Retriever": {
"ai_retriever": [
[
{
"node": "Question and Answer Chain",
"type": "ai_retriever",
"index": 0
}
]
]
},
"Pinecone Vector Store": {
"ai_vectorStore": [
[
{
"node": "Vector Store Retriever",
"type": "ai_vectorStore",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Pinecone Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Question and Answer Chain": {
"main": [
[
{
"node": "Telegram",
"type": "main",
"index": 0
}
]
]
},
"Set Query1": {
"main": [
[
{
"node": "Search in Pinecone",
"type": "main",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "Send answer",
"type": "main",
"index": 0
}
],
[
{
"node": "Send not found",
"type": "main",
"index": 0
}
]
]
},
"Search in Pinecone": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
],
[
{
"node": "Execute Workflow",
"type": "main",
"index": 0
}
]
]
},
"Send answer": {
"main": [
[
{
"node": "Log success",
"type": "main",
"index": 0
}
]
]
},
"Send not found": {
"main": [
[
{
"node": "Log not found",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1",
"saveExecutionProgress": true,
"callerPolicy": "workflowsFromSameOwner"
},
"versionId": "bbc1d01c-1b5c-48e7-8ce5-499e99a2f76c",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "fjRGf2bRs21MfyK7",
"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.
googleApihttpHeaderAuthopenAiApipineconeApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
bug_reporter. Uses telegramTrigger, chainRetrievalQa, lmChatOpenAi, retrieverVectorStore. Event-driven trigger; 17 nodes.
Source: https://github.com/visllove/bug_reporter_bot/blob/a67d94b338c91fb6b612e7e21e6f6ff8222c6381/n8n_workflows/bug_reporter.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.
This comprehensive workflow bundle is designed as a powerful starter kit, enabling you to build a multi-functional AI assistant on Telegram. It seamlessly integrates AI-powered voice interactions, an
This n8n template automatically classifies incoming emails (Sales, Support, Internal, Finance, Promotions) and routes them to a dedicated OpenAI LLM Agent for processing. Depending on the category, th
Telegram dummy_client. Uses telegramTrigger, agent, lmChatOpenAi, telegram. Event-driven trigger; 48 nodes.
This workflow automates the early-stage job application process using AI.
🛠️ How It Works: System Architecture Workflow ini bekerja melalui empat lapisan proses utama yang terintegrasi secara otomatis: Input Processing & Routing Telegram Trigger: Menangkap setiap pesan masu