Respondedor de clientes IG/TG

Intermedio

Este es unSupport Chatbot, AI Chatbotflujo de automatización del dominio deautomatización que contiene 10 nodos.Utiliza principalmente nodos como Code, Webhook, GoogleSheets, RespondToWebhook, ChainLlm. Respuesta automatizada a consultas de producto con GPT-4 y Google Sheets

Requisitos previos
  • Punto final de HTTP Webhook (n8n generará automáticamente)
  • Credenciales de API de Google Sheets
  • Clave de API de OpenAI
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": "vMvm0kfL6V7u4bPO",
  "meta": {
    "instanceId": "089a426694e95c86fd56db3433ae1586d34120d3ffcad01bcaa9ff768b7f5853",
    "templateCredsSetupCompleted": true
  },
  "name": "Client Responder IG/TG",
  "tags": [],
  "nodes": [
    {
      "id": "be329d21-b0fb-49a4-92ed-651f2297890c",
      "name": "Modelo de chat OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -340,
        220
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-3.5-turbo",
          "cachedResultName": "gpt-3.5-turbo"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "sSgwqUMSiCdMlx5r",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "aadcdcde-c6b2-4815-8088-4f310f4d0065",
      "name": "Modelo de chat OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        780,
        200
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4",
          "cachedResultName": "gpt-4"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "sSgwqUMSiCdMlx5r",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "760e2d6c-b121-4de8-bcf9-b117d2a771bc",
      "name": "Nota adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -700,
        -340
      ],
      "parameters": {
        "color": 3,
        "width": 2060,
        "height": 860,
        "content": "Workflow Node Descriptions:\nReceive Request: \"📥 Incoming customer message\"\nParse Request AI: \"🤖 Extract brand/model/size from text\"\nExtract Data: \"📊 Process JSON output\"\nProduct Database: \"📋 Load all products from inventory\"\nFilter Products: \"🔍 Find matching items only\"\nAI Manager: \"💬 Generate friendly response\"\nSend Response: \"📤 Deliver result to customer\""
      },
      "typeVersion": 1
    },
    {
      "id": "e89e72bb-c8ad-406c-a9a5-1297ae4974c9",
      "name": "Receive Request",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -600,
        0
      ],
      "webhookId": "753f3fe9-b17b-4431-81c2-a011044768d0",
      "parameters": {
        "path": "/shoe-orders",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "f0ee0564-5a40-4174-a80f-8c74d2d7e878",
      "name": "Parse Request AI",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -360,
        0
      ],
      "parameters": {
        "text": "={{ $('Receive Request').first().json.body.message }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "type": "=SystemMessagePromptTemplate",
              "message": "=Extract shoe details from customer inquiry: brand name, model name, size, and color. Return only valid JSON format: {\"brand\": \"\", \"model\": \"\", \"size\": \"\", \"color\": \"\"}\n\nExamples:\n- \"Do you have Nike Air Max size 40?\" → {\"brand\": \"Nike\", \"model\": \"Air Max\", \"size\": \"40\", \"color\": \"\"}\n- \"Looking for white Adidas size 38\" → {\"brand\": \"Adidas\", \"model\": \"\", \"size\": \"38\", \"color\": \"white\"}\n\nCustomer message: {{ $json.message }}"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "8805f637-67ed-40e7-97c2-02bb84da2f2d",
      "name": "Extract Data",
      "type": "n8n-nodes-base.code",
      "position": [
        80,
        0
      ],
      "parameters": {
        "jsCode": "const input = $input.first().json;\nconst parsedData = JSON.parse(input.text);\n\nreturn [{\n  json: {\n    brand: parsedData.brand || \"\",\n    model: parsedData.model || \"\",\n    size: parsedData.size || \"\",\n    color: parsedData.color || \"\"\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "690c3190-4732-475a-8fad-00faa6897bf9",
      "name": "Product Database",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        300,
        0
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1AczF58510i-QEppNi_UnzgqqfX0ickNJZjFW2Bu-6mI/edit#gid=0",
          "cachedResultName": "Лист1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1AczF58510i-QEppNi_UnzgqqfX0ickNJZjFW2Bu-6mI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1AczF58510i-QEppNi_UnzgqqfX0ickNJZjFW2Bu-6mI/edit?usp=drivesdk",
          "cachedResultName": "In Stock"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "up4mnfP28XT5t6r6",
          "name": "Google Sheets account 2"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "3da1277f-e726-4818-8ff6-e7e888d353ab",
      "name": "Filtrar Products",
      "type": "n8n-nodes-base.code",
      "position": [
        540,
        0
      ],
      "parameters": {
        "jsCode": "const allItems = $input.all();\nconst search = $('Extract Data').first().json;\n\nconst filtered = allItems.filter(item => {\n  const brandMatch = item.json.Brand?.toString()?.toLowerCase() === search.brand?.toLowerCase();\n  const modelMatch = search.model ? item.json.Model?.toString()?.toLowerCase().includes(search.model?.toLowerCase()) : true;\n  const sizeMatch = item.json.Size?.toString() === search.size;\n  const colorMatch = search.color ? item.json.Color?.toString()?.toLowerCase().includes(search.color?.toLowerCase()) : true;\n  \n  return brandMatch && modelMatch && sizeMatch && colorMatch;\n});\n\nreturn filtered;"
      },
      "typeVersion": 2
    },
    {
      "id": "37324505-d063-4d2a-9c2e-d195b54357eb",
      "name": "AI Manager",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        740,
        0
      ],
      "parameters": {
        "text": "={{ $('Receive Request').first().json.body.message }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "type": "=SystemMessagePromptTemplate",
              "message": "=You are a friendly shoe store assistant. Based on the product data below, generate a helpful response about availability, pricing, and stock.\n\nProduct data: {{ JSON.stringify($input.all()) }}\n\nResponse style: Friendly, helpful, and informative. Include price, stock quantity, and suggest alternatives if item is out of stock."
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "d2e5c074-c68a-489c-8503-51cbda2bc267",
      "name": "Send Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1140,
        0
      ],
      "parameters": {
        "options": {},
        "respondWith": "text",
        "responseBody": "={{ $json.text }}"
      },
      "typeVersion": 1.3
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "aa3fd2f1-d011-4c19-ab53-b2e3405a1c5c",
  "connections": {
    "37324505-d063-4d2a-9c2e-d195b54357eb": {
      "main": [
        [
          {
            "node": "d2e5c074-c68a-489c-8503-51cbda2bc267",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8805f637-67ed-40e7-97c2-02bb84da2f2d": {
      "main": [
        [
          {
            "node": "690c3190-4732-475a-8fad-00faa6897bf9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Products": {
      "main": [
        [
          {
            "node": "37324505-d063-4d2a-9c2e-d195b54357eb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e89e72bb-c8ad-406c-a9a5-1297ae4974c9": {
      "main": [
        [
          {
            "node": "f0ee0564-5a40-4174-a80f-8c74d2d7e878",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f0ee0564-5a40-4174-a80f-8c74d2d7e878": {
      "main": [
        [
          {
            "node": "8805f637-67ed-40e7-97c2-02bb84da2f2d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "690c3190-4732-475a-8fad-00faa6897bf9": {
      "main": [
        [
          {
            "node": "Filter Products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "f0ee0564-5a40-4174-a80f-8c74d2d7e878",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "37324505-d063-4d2a-9c2e-d195b54357eb",
            "type": "ai_languageModel",
            "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?

Intermedio - Chatbot de soporte, Chatbot de IA

¿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
Intermedio
Número de nodos10
Categoría2
Tipos de nodos7
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Autor
Dmytro

Dmytro

@dima-ai

Not a professional developer, just someone who believes automation can make our already challenging lives a bit easier. I create practical n8n workflows that solve real business problems - from AI-powered customer service to inventory management. Based in Ukraine, I understand the value of efficiency and resourcefulness. My workflows are designed for small businesses and entrepreneurs who need smart solutions without breaking the bank.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34