LENOHA - Soporte al Cliente

Avanzado

Este es unautomatización que contiene 20 nodos.Utiliza principalmente nodos como If, Set, Merge, GoogleSheets, ManualTrigger. Construye un sistema de soporte al cliente de doble vía usando Google Sheets, vectores y LLM de Gemini

Requisitos previos
  • Credenciales de API de Google Sheets

Categoría

-
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "id": "FqCqWFe2l39CkWJJ",
  "meta": {
    "instanceId": "1587aac4fefe327cb562f0b60579d4f70119b083ab9ab93deb05f9d7431f8788",
    "templateCredsSetupCompleted": true
  },
  "name": "LENOHA-Customer-Support",
  "tags": [],
  "nodes": [
    {
      "id": "a1572a1d-1d1f-4abc-8f1d-364e58381368",
      "name": "Al hacer clic en 'Ejecutar flujo de trabajo'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -64,
        -432
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "31098d41-56e5-4859-8218-41b79b6878c1",
      "name": "Inferencia de Incrustaciones HuggingFace",
      "type": "@n8n/n8n-nodes-langchain.embeddingsHuggingFaceInference",
      "position": [
        480,
        -208
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "huggingFaceApi": {
          "id": "pTwemQjQAyHf8rnL",
          "name": "HuggingFaceApi account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "41ff1a9f-9b1a-4ae4-a93b-f55c63ad430b",
      "name": "Cargador de Datos Predeterminado",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        688,
        -208
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "d22d074b-35f8-4a65-9b2d-1e9d697076f5",
      "name": "Cuando se recibe un mensaje en el chat",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -128,
        496
      ],
      "webhookId": "fb5ca44e-a73c-44dd-834b-2df1ca9b49d6",
      "parameters": {
        "options": {
          "responseMode": "responseNodes"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "8209ba33-0036-45e7-993b-d3a1ee26c4db",
      "name": "Responder en el Chat",
      "type": "@n8n/n8n-nodes-langchain.chat",
      "position": [
        1104,
        192
      ],
      "parameters": {
        "message": "={{ $json.Answer }}",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "9142cb58-be78-476c-a545-83f6f75c1986",
      "name": "Nota Adhesiva1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -560
      ],
      "parameters": {
        "width": 1104,
        "height": 512,
        "content": "## 0. Create Embeddings\n- Get common questions from your own knowledge base\n- Use persistent vector store for embeddings"
      },
      "typeVersion": 1
    },
    {
      "id": "c36b56dc-375f-417f-ae07-38433f800cca",
      "name": "Nota Adhesiva3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        384
      ],
      "parameters": {
        "color": 2,
        "width": 368,
        "height": 272,
        "content": "## 1. Receive a user message"
      },
      "typeVersion": 1
    },
    {
      "id": "5f7477ea-3529-427e-a565-8653e4ba5210",
      "name": "Nota Adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        32
      ],
      "parameters": {
        "color": 3,
        "width": 528,
        "height": 480,
        "content": "## 2. Evaluate user message\n- Generate embeddings for the user message\n- Check against your vector store for relevant questions\n- IMPORTANT: You need to fine-tune your similarity score threshold within the If/Else-Node"
      },
      "typeVersion": 1
    },
    {
      "id": "b5a86a31-cc26-43ec-bebc-18c3e6077777",
      "name": "Nota Adhesiva2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        32
      ],
      "parameters": {
        "color": 4,
        "width": 512,
        "height": 352,
        "content": "## 3.1 Reply from FAQ\n- If the user query is similar to a question from your knowledge base, the pre-defined, static answer is returned"
      },
      "typeVersion": 1
    },
    {
      "id": "361a09fd-2384-478b-b05e-3dc07fcc6c40",
      "name": "Nota Adhesiva4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        816,
        432
      ],
      "parameters": {
        "color": 4,
        "width": 784,
        "height": 368,
        "content": "## 3.2 Reply via LLM\n- If the user query is not found within the knowledge base, a smaller LLM can answer"
      },
      "typeVersion": 1
    },
    {
      "id": "ea069bda-92ef-441b-ab7c-79aa85602d0a",
      "name": "Inferencia de Incrustaciones HuggingFace2",
      "type": "@n8n/n8n-nodes-langchain.embeddingsHuggingFaceInference",
      "position": [
        432,
        368
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "huggingFaceApi": {
          "id": "pTwemQjQAyHf8rnL",
          "name": "HuggingFaceApi account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f04bce14-f24f-4ef2-968a-5d9c529ee9de",
      "name": "Responder en el Chat1",
      "type": "@n8n/n8n-nodes-langchain.chat",
      "position": [
        1392,
        544
      ],
      "parameters": {
        "message": "={{ $json.content.parts[0].text }}",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "4a302856-38e1-413f-8810-d140a99a0187",
      "name": "Base de Datos de Conocimiento",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        144,
        -432
      ],
      "parameters": {
        "options": {
          "returnFirstMatch": false
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1748220104,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tSEu_-7KAupdkFJGzoPBc-zqBBAmPgGoc89JyvqhY90/edit#gid=1748220104",
          "cachedResultName": "Tabellenblatt2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1tSEu_-7KAupdkFJGzoPBc-zqBBAmPgGoc89JyvqhY90",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tSEu_-7KAupdkFJGzoPBc-zqBBAmPgGoc89JyvqhY90/edit?usp=drivesdk",
          "cachedResultName": "Stripe_Dummy_FAQ"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "DOSJUMfKHxvCgJTm",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": false
    },
    {
      "id": "d9c346d2-4b07-460d-8154-1a0749e4d921",
      "name": "Extraer Preguntas",
      "type": "n8n-nodes-base.set",
      "position": [
        352,
        -432
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "48e49d98-11b7-478a-91fb-ecf198fdd9e7",
              "name": "row_number",
              "type": "number",
              "value": "={{ $json.row_number }}"
            },
            {
              "id": "9b40b5a1-a73b-4af3-a96c-bc52226cc4bc",
              "name": "Question",
              "type": "string",
              "value": "={{ $json.Question }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "dc2510c2-0cc2-436c-92eb-854aae56efd8",
      "name": "Generar y Almacenar Incrustaciones",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
      "position": [
        560,
        -432
      ],
      "parameters": {
        "mode": "insert",
        "memoryKey": {
          "__rl": true,
          "mode": "list",
          "value": "vector_store_key"
        },
        "embeddingBatchSize": 1
      },
      "typeVersion": 1.3
    },
    {
      "id": "672b7a01-d236-412b-acef-09b1e7674ae9",
      "name": "Recuperar y Puntuar Incrustaciones",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
      "position": [
        336,
        208
      ],
      "parameters": {
        "mode": "load",
        "topK": 2,
        "prompt": "={{ $json.chatInput }}",
        "memoryKey": {
          "__rl": true,
          "mode": "list",
          "value": "vector_store_key"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b5d2db8d-b14c-4162-8fd1-c3163efd2b72",
      "name": "Determinar Tipo de Pregunta",
      "type": "n8n-nodes-base.if",
      "position": [
        624,
        208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f6f2c4ab-cebf-4dea-baec-5ec3e50e88ab",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $json.score }}",
              "rightValue": 0.8
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d182bbc1-1822-424f-8c05-b3503b53b6c1",
      "name": "Obtener Respuestas Respectivas",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        880,
        192
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.document.pageContent }}",
              "lookupColumn": "Question"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1748220104,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tSEu_-7KAupdkFJGzoPBc-zqBBAmPgGoc89JyvqhY90/edit#gid=1748220104",
          "cachedResultName": "Tabellenblatt2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1tSEu_-7KAupdkFJGzoPBc-zqBBAmPgGoc89JyvqhY90",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tSEu_-7KAupdkFJGzoPBc-zqBBAmPgGoc89JyvqhY90/edit?usp=drivesdk",
          "cachedResultName": "Stripe_Dummy_FAQ"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "DOSJUMfKHxvCgJTm",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "2f3bf992-7f08-40f4-86ab-16242abc79d5",
      "name": "Reenviar Mensaje del Chat",
      "type": "n8n-nodes-base.merge",
      "position": [
        880,
        544
      ],
      "parameters": {
        "mode": "chooseBranch",
        "useDataOfInput": 2
      },
      "typeVersion": 3.2
    },
    {
      "id": "69646d36-32f5-4f04-bf15-4463398d969d",
      "name": "Modelo de Chat",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1072,
        544
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-2.5-flash-lite",
          "cachedResultName": "models/gemini-2.5-flash-lite"
        },
        "options": {
          "systemMessage": "# Role:\nYou are a conversational AI assistant. Your primary function is to handle casual conversation and general inquiries that do not pertain to specific company policies or user account details.\n\n# Task:\nEngage the user in a friendly, helpful, and brief manner. You are the fallback agent for queries that could not be answered by our primary FAQ knowledge base.\n\n# CRITICAL RULES:\nScope Limitation: You MUST NOT attempt to answer any specific questions related to policies, pricing, fees, disputes, payout schedules, security, or personal account information. Your knowledge base does not contain this information.\nNo Speculation: If you are unsure about a user's query, NEVER guess the answer. It is safer to state your limitation.\nBrevity: Keep your responses concise and to the point (1-2 sentences).\n\n# Response Strategy & Disclaimer:\nIf a user's question seems to be asking for specific details, even if it appears simple, you must use the following disclaimer. Do not attempt to answer the question first.\n\n# Disclaimer: \"I am not equipped to handle specific policy or account-level questions to ensure your information is kept safe and accurate. For detailed assistance, I recommend checking our official Help Center or contacting a human support agent.\""
        },
        "messages": {
          "values": [
            {
              "content": "={{ $json.chatInput }}"
            }
          ]
        }
      },
      "credentials": {
        "googlePalmApi": {
          "id": "GcENObs5mnIvIGOc",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "650ce0df-104b-417a-903d-160f095dc823",
  "connections": {
    "69646d36-32f5-4f04-bf15-4463398d969d": {
      "main": [
        [
          {
            "node": "f04bce14-f24f-4ef2-968a-5d9c529ee9de",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d9c346d2-4b07-460d-8154-1a0749e4d921": {
      "main": [
        [
          {
            "node": "Generar y Almacenar Embeddings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4a302856-38e1-413f-8810-d140a99a0187": {
      "main": [
        [
          {
            "node": "d9c346d2-4b07-460d-8154-1a0749e4d921",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "41ff1a9f-9b1a-4ae4-a93b-f55c63ad430b": {
      "ai_document": [
        [
          {
            "node": "Generar y Almacenar Embeddings",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "2f3bf992-7f08-40f4-86ab-16242abc79d5": {
      "main": [
        [
          {
            "node": "69646d36-32f5-4f04-bf15-4463398d969d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d182bbc1-1822-424f-8c05-b3503b53b6c1": {
      "main": [
        [
          {
            "node": "8209ba33-0036-45e7-993b-d3a1ee26c4db",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b5d2db8d-b14c-4162-8fd1-c3163efd2b72": {
      "main": [
        [
          {
            "node": "d182bbc1-1822-424f-8c05-b3503b53b6c1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "2f3bf992-7f08-40f4-86ab-16242abc79d5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d22d074b-35f8-4a65-9b2d-1e9d697076f5": {
      "main": [
        [
          {
            "node": "Recuperar y Puntuar Embeddings",
            "type": "main",
            "index": 0
          },
          {
            "node": "2f3bf992-7f08-40f4-86ab-16242abc79d5",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Generar y Almacenar Embeddings": {
      "main": [
        []
      ]
    },
    "Recuperar y Puntuar Embeddings": {
      "main": [
        [
          {
            "node": "b5d2db8d-b14c-4162-8fd1-c3163efd2b72",
            "type": "main",
            "index": 0
          }
        ]
      ],
      "ai_tool": [
        []
      ]
    },
    "Inferencia de Embeddings HuggingFace": {
      "ai_embedding": [
        [
          {
            "node": "Generar y Almacenar Embeddings",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Inferencia de Embeddings HuggingFace2": {
      "ai_embedding": [
        [
          {
            "node": "Recuperar y Puntuar Embeddings",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "a1572a1d-1d1f-4abc-8f1d-364e58381368": {
      "main": [
        [
          {
            "node": "4a302856-38e1-413f-8810-d140a99a0187",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿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?

Avanzado

¿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.

Información del flujo de trabajo
Nivel de dificultad
Avanzado
Número de nodos20
Categoría-
Tipos de nodos12
Descripción de la dificultad

Adecuado para usuarios avanzados, flujos de trabajo complejos con 16+ nodos

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34