Chatbot para soporte de clientes y captación de clientes con RAG, GPT-4o y Telegram
Este es unSupport Chatbotflujo de automatización del dominio deautomatización que contiene 14 nodos.Utiliza principalmente nodos como TelegramTool, Agent, GoogleSheetsTool, ChatTrigger, LmChatOpenAi. Chatbot de soporte de clientes y captación de leads usando RAG, GPT-4o, Sheets y Telegram
- •Bot Token de Telegram
- •Credenciales de API de Google Sheets
- •Clave de API de OpenAI
- •Clave de API de Pinecone
Nodos utilizados (14)
Categoría
{
"id": "gH7TgPzRzkONOivn",
"meta": {
"instanceId": "a244e08ca65e768d1cee097a486ef066f1968b077e055f21a34efe4e78c40e76",
"templateCredsSetupCompleted": true
},
"name": "Customer Support & Lead Collection Chatbot with RAG, GPT-4o & Telegram",
"tags": [
{
"id": "AOZlNztgqiOQKd6j",
"name": "n8n Creators",
"createdAt": "2025-09-28T11:02:15.227Z",
"updatedAt": "2025-09-28T11:02:15.227Z"
}
],
"nodes": [
{
"id": "0cd4236d-fa91-405f-bbd9-a816098202f5",
"name": "Cuando se recibe un mensaje en el chat",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
0,
0
],
"webhookId": "73cc5ea3-7518-488b-955e-df5e78ee12b3",
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"name": "Agente de IA",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
384,
0
],
"parameters": {
"options": {
"systemMessage": "=## Role:\nYou are a friendly assistant for a company named **[INSERT_YOUR_COMPANY_NAME_HERE]**.\n\n## Task:\nYou answer questions about the business.\n\n## Details:\nYou have access to various tools, which you use correctly.\n\n## Tools:\n- **Company Q&A** \n Use this tool to answer questions with knowledge about the company.\n\n- **Google Sheets Agentic Tool** \n Use this tool to store contact information such as name, email, interested in and phone number.\n\n- **Telegram Agentic Tool**\n Use this tool to send a notification with the user's contact information and a summary of the conversation.\n\nAfter a customer asks about opening hours, products, location, or business information, ask them for their name, email, specific interests and phone number."
}
},
"typeVersion": 2.2
},
{
"id": "33f3d156-d41d-44e2-af46-d29cb9fe7832",
"name": "Memoria de Conversación",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
368,
224
],
"parameters": {
"contextWindowLength": 12
},
"typeVersion": 1.3
},
{
"id": "d205da7f-7acc-4709-9878-331a70218ce7",
"name": "Preguntas y Respuestas de la Empresa",
"type": "@n8n/n8n-nodes-langchain.toolVectorStore",
"position": [
432,
400
],
"parameters": {
"description": "Gives answers related to the company."
},
"typeVersion": 1.1
},
{
"id": "ab524ffa-cce1-4dee-938e-fbdee31b353c",
"name": "Pinecone Vector Store (Base de Conocimiento de la Empresa)",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
384,
560
],
"parameters": {
"options": {
"pineconeNamespace": "Q&A"
},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "company",
"cachedResultName": "company"
}
},
"credentials": {
"pineconeApi": {
"id": "lJsLCGEJnS6Ij994",
"name": "PineconeApi account"
}
},
"typeVersion": 1.3
},
{
"id": "28bd6bd0-bedc-47a0-b345-a18f7d2e7831",
"name": "Generar Incrustaciones (OpenAI)",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
464,
704
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "1rHbxq7xrWlOZ6zj",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "98dcb3ff-693a-47d3-9031-502dfe49becf",
"name": "Activador – Cómo Publicar",
"type": "n8n-nodes-base.stickyNote",
"position": [
-96,
-144
],
"parameters": {
"width": 256,
"height": 304,
"content": "## Trigger\n\nYou can switch to Publicly Available to be able to share this chatbot interface with a link. \n"
},
"typeVersion": 1
},
{
"id": "55791e26-65d8-4af8-ad8b-d321044583de",
"name": "Agente de IA – Flujo",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
-240
],
"parameters": {
"width": 736,
"height": 608,
"content": "## AI Agent\n\nPowered with OpenAI API (GPT-4o) -- you can replace it with your favourite LLM.\n\nThe agent, after providing information requested by the user, asks for contact information and stores it in Google Sheets. \n\nThen sends a notification to Telegram with the contact information and a summary of the conversation.\n\n"
},
"typeVersion": 1
},
{
"id": "d71bbe39-776a-465d-a463-84d6fcaa6f70",
"name": "Base de Datos RAG – Configuración",
"type": "n8n-nodes-base.stickyNote",
"position": [
256,
384
],
"parameters": {
"width": 656,
"height": 592,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## RAG Database\n\nConnect a Pinecone RAG database with knowledge about your company. An OpenAI text-embedding-3-small model handles data retrieval.\n"
},
"typeVersion": 1
},
{
"id": "f9e798e4-771f-47f6-8fc6-87379e5c388c",
"name": "Enviar Lead a Telegram",
"type": "n8n-nodes-base.telegramTool",
"position": [
624,
224
],
"webhookId": "3d40f03b-9560-4c2a-b64d-bca5736f148b",
"parameters": {
"text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Text', ``, 'string') }}",
"chatId": "[INSERT_YOUR_CHAT_ID]",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "xV3Qf8JA7DE2hn9V",
"name": "Telegram test"
}
},
"typeVersion": 1.2
},
{
"id": "f045418b-84c6-4476-8a06-0538fe7eb191",
"name": "Guardar Lead en Google Sheets",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
768,
224
],
"parameters": {
"columns": {
"value": {
"Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Name', ``, 'string') }}",
"Email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Email', ``, 'string') }}",
"Phone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone', ``, 'string') }}",
"Interested in": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Interested_in', ``, 'string') }}"
},
"schema": [
{
"id": "Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Phone",
"type": "string",
"display": true,
"required": false,
"displayName": "Phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Interested in",
"type": "string",
"display": true,
"required": false,
"displayName": "Interested in",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ccKn1a35BDW3Vqe6cCjoiWlDTl5XIY48PUFYUREVZeM/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ccKn1a35BDW3Vqe6cCjoiWlDTl5XIY48PUFYUREVZeM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ccKn1a35BDW3Vqe6cCjoiWlDTl5XIY48PUFYUREVZeM/edit?usp=drivesdk",
"cachedResultName": "NovaCore Solutions Leads"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "3CWHe6cifmQtahz8",
"name": "SmartCamp.AI Google Sheets"
}
},
"typeVersion": 4.7
},
{
"id": "c08fa915-6a60-453b-a663-058c92c1355f",
"name": "Modelo de Respuesta de la Empresa",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
672,
608
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "1rHbxq7xrWlOZ6zj",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "54007e6f-bf76-4811-950e-b2bd316d75c1",
"name": "Modelo Principal del Chat",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
224,
224
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "1rHbxq7xrWlOZ6zj",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "guide-sticky-001",
"name": "Guía de Plantilla",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-160
],
"parameters": {
"width": 736,
"height": 736,
"content": "## Template Guide (Overview, Prerequisites & Customization)\n\n**What it does:** This workflow delivers a production-ready customer support and lead collection chatbot.\nIt answers company questions using Retrieval-Augmented Generation (RAG) and then captures lead details\n(name, email, phone, interest) to Google Sheets, while instantly notifying your team on Telegram with a\nshort summary of the conversation.\n\n**Target audience:** SMBs, startups, agencies and internal teams that want a 24/7 assistant which reduces\nrepetitive Q&A, improves response time and centralizes leads for follow-up.\n\n**How it works (high level):**\n1) A visitor sends a message to the chat interface (Trigger).\n2) The **Main Chat Model (GPT‑4o)** manages the conversation and tool usage.\n3) For company facts, the agent calls **Company Q&A**, which performs RAG over your **Pinecone Vector Store**.\n4) After answering, the agent politely asks for **Name / Email / Phone / Interested in**.\n5) The lead is appended to **Google Sheets** and your team receives a Telegram notification.\n6) **Conversation Memory** keeps short-term context for a smoother chat experience.\n\n**Prerequisites:**\n- OpenAI API key (GPT‑4o + text-embedding-3‑small for retrieval)\n- Pinecone project/index with your company knowledge (FAQs, docs, pricing, policies)\n- Google account with a Sheet for storing leads (columns: Name, Email, Phone, Interested in)\n- Telegram Bot Token and chat/group ID for notifications\n\n**Customization:**\n- Replace `[INSERT_YOUR_COMPANY_NAME_HERE]` in the Agent’s system message.\n- Point the Pinecone node to your index/namespace.\n- Update the Google Sheets node to your Sheet ID and tab.\n- Set your Telegram `chatId`.\n- Adjust the **context window** and **prompt tone** to match your brand.\n\n**Notes & tips:**\n- Keep your knowledge base concise and up to date to improve RAG accuracy.\n- Use validation in Sheets (optional) to ensure clean lead data.\n- Consider adding duplicate checks, CRM sync, or email follow-ups as next steps."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d216f344-bdc5-4b44-916f-8eaec439de1f",
"connections": {
"da8b3e29-20c2-4f16-a01e-b7ae45bb0efa": {
"main": [
[]
]
},
"d205da7f-7acc-4709-9878-331a70218ce7": {
"ai_tool": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "ai_tool",
"index": 0
}
]
]
},
"54007e6f-bf76-4811-950e-b2bd316d75c1": {
"ai_languageModel": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"33f3d156-d41d-44e2-af46-d29cb9fe7832": {
"ai_memory": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "ai_memory",
"index": 0
}
]
]
},
"f9e798e4-771f-47f6-8fc6-87379e5c388c": {
"ai_tool": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "ai_tool",
"index": 0
}
]
]
},
"c08fa915-6a60-453b-a663-058c92c1355f": {
"ai_languageModel": [
[
{
"node": "d205da7f-7acc-4709-9878-331a70218ce7",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"f045418b-84c6-4476-8a06-0538fe7eb191": {
"ai_tool": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "ai_tool",
"index": 0
}
]
]
},
"0cd4236d-fa91-405f-bbd9-a816098202f5": {
"main": [
[
{
"node": "da8b3e29-20c2-4f16-a01e-b7ae45bb0efa",
"type": "main",
"index": 0
}
]
]
},
"28bd6bd0-bedc-47a0-b345-a18f7d2e7831": {
"ai_embedding": [
[
{
"node": "ab524ffa-cce1-4dee-938e-fbdee31b353c",
"type": "ai_embedding",
"index": 0
}
]
]
},
"ab524ffa-cce1-4dee-938e-fbdee31b353c": {
"ai_vectorStore": [
[
{
"node": "d205da7f-7acc-4709-9878-331a70218ce7",
"type": "ai_vectorStore",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Intermedio - Chatbot de soporte
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Karol Otręba
@smart-camp-aiCompartir este flujo de trabajo