Agente de ventas conversacional para WooCommerce basado en GPT-4, Stripe e integración CRM
Este es unAI Chatbot, Multimodal AIflujo de automatización del dominio deautomatización que contiene 27 nodos.Utiliza principalmente nodos como Set, GoogleDrive, HttpRequest, TelegramTool, ManualTrigger. Agente de ventas conversacional de WooCommerce basado en GPT-4, Stripe e integraciones de CRM
- •Credenciales de API de Google Drive
- •Pueden requerirse credenciales de autenticación para la API de destino
- •Bot Token de Telegram
- •Clave de API de OpenAI
- •Información de conexión del servidor Qdrant
- •Clave de API de Google Gemini
Nodos utilizados (27)
Categoría
{
"meta": {
"instanceId": "783d2046f405cc6ecb20ef185376ed1023323a3da628b9d8156b1fb75c75e037",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "6ba11958-a915-44d5-828d-5502e020848f",
"name": "Cuando se recibe mensaje de chat",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
240,
-496
],
"webhookId": "SALES-CHAT-TRIGGER",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "b4c04258-79b5-4c46-94c7-969d837a6857",
"name": "Al hacer clic en 'Ejecutar flujo'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
224,
-1216
],
"parameters": {},
"typeVersion": 1
},
{
"id": "b9a981fb-41eb-455a-9078-f91bdbed110d",
"name": "Editar Campos1",
"type": "n8n-nodes-base.set",
"position": [
448,
-496
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "s1",
"name": "sessionId",
"type": "string",
"value": "={{ $json.sessionId }}"
},
{
"id": "s2",
"name": "chatInput",
"type": "string",
"value": "={{ $json.chatInput }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "f94da395-1334-4466-8d5a-d300a70f5119",
"name": "Memoria de Búfer de Ventana1",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1168,
-224
],
"parameters": {
"sessionKey": "={{ $('Edit Fields1').item.json.sessionId }}",
"sessionIdType": "customKey",
"contextWindowLength": 12
},
"typeVersion": 1.3
},
{
"id": "f4c91458-29e6-4814-a64d-e512ac5da230",
"name": "Extractor de Información de Ventas1",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
672,
-496
],
"parameters": {
"text": "={{ $json.chatInput }}",
"options": {
"systemPromptTemplate": "You extract buyer intent (product|faq|payment|lead) and fields (keyword, sku, min_price, max_price, name, email). Prices are numbers only. Do not hallucinate."
},
"schemaType": "manual",
"inputSchema": "{\n \"intents\": { \"product\": true, \"faq\": true, \"payment\": true, \"lead\": true },\n \"fields\": {\n \"keyword\": \"\",\n \"sku\": \"\",\n \"min_price\": \"\",\n \"max_price\": \"\",\n \"name\": \"\",\n \"email\": \"\"\n }\n}"
},
"typeVersion": 1
},
{
"id": "e102585a-a1a8-48b6-afdb-ed4eb69a638e",
"name": "Modelo de Chat OpenAI (Extractor)1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
768,
-336
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "TmPSRVY5JCpWCR5d",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "562d9402-9902-4eb3-a6ca-a87f388b45e7",
"name": "Agente de IA de Ventas1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1200,
-496
],
"parameters": {
"options": {
"systemMessage": "=## Role\nYou are Sales AI Agent. Use tools only.\n\n## Routing\n- If extractor.intents.faq = true => use RAG_FAQ.\n- If extractor.intents.product = true => PRODUCT_SEARCH_WOO, then INVENTORY_DETAIL_WOO for shortlisted SKU.\n- If extractor.intents.payment = true => PAYMENT_LINK.\n- If name+email present => CRM_LEAD.\n- If blocked/unsure => HUMAN_ESCALATION.\n\n## Output\n- List products as: Title | Price | In stock | URL/Handle | SKU.\n- Always propose next actions: (1) Xem thêm lựa chọn, (2) Lấy link thanh toán, (3) Nói chuyện với tư vấn viên.\n\nToday is {{$now}}."
}
},
"typeVersion": 1.8
},
{
"id": "2ab2d2c1-5182-49d0-911f-85b6f2349070",
"name": "Modelo de Chat OpenAI (Agente)1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1040,
-224
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "TmPSRVY5JCpWCR5d",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "5469d03d-4a0f-410f-afc8-09083f697395",
"name": "Almacén Vectorial Qdrant (runtime)1",
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"position": [
1248,
-64
],
"parameters": {
"options": {},
"qdrantCollection": {
"__rl": true,
"mode": "list",
"value": "sales_docs",
"cachedResultName": "sales_docs"
}
},
"credentials": {
"qdrantApi": {
"id": "WuffyG4RFaqOwLb4",
"name": "QdrantApi account"
}
},
"typeVersion": 1
},
{
"id": "c3d1075f-e019-4e47-92ca-0efc5d937c3f",
"name": "RAG_FAQ1",
"type": "@n8n/n8n-nodes-langchain.toolVectorStore",
"position": [
1328,
-256
],
"parameters": {
"name": "RAG_FAQ",
"description": "Answer FAQs/policies/specs from vector store"
},
"typeVersion": 1
},
{
"id": "4cbfa8de-aae7-4d9e-bc76-42e002b92a27",
"name": "Embeddings OpenAI (runtime)1",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
1248,
80
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "TmPSRVY5JCpWCR5d",
"name": "OpenAi account"
}
},
"typeVersion": 1.1
},
{
"id": "eb21abb7-76c0-4353-874c-0138a6581b84",
"name": "BÚSQUEDA_PRODUCTO_WOO1",
"type": "n8n-nodes-base.wooCommerceTool",
"position": [
1728,
-208
],
"parameters": {
"options": {
"sku": "={{ $('Sales Info Extractor1').item.json.fields.sku }}",
"search": "={{ $('Sales Info Extractor1').item.json.fields.keyword }}",
"maxPrice": "={{ $('Sales Info Extractor1').item.json.fields.max_price }}",
"minPrice": "={{ $('Sales Info Extractor1').item.json.fields.min_price }}",
"stockStatus": "instock"
},
"operation": "getAll"
},
"credentials": {
"wooCommerceApi": {
"id": "xEyvCU5Qw9lQh7WS",
"name": "WooCommerce account"
}
},
"typeVersion": 1
},
{
"id": "c608958f-cda9-42f2-9ce4-86a02a8e1f0b",
"name": "DETALLE_INVENTARIO_WOO1",
"type": "n8n-nodes-base.wooCommerceTool",
"position": [
1904,
-208
],
"parameters": {
"operation": "get",
"productId": "={{ $fromAI('product_id', '', 'string') }}"
},
"credentials": {
"wooCommerceApi": {
"id": "xEyvCU5Qw9lQh7WS",
"name": "WooCommerce account"
}
},
"typeVersion": 1
},
{
"id": "68eb6073-8be1-4f3b-88fc-9c28fa7b8a63",
"name": "ENLACE_PAGO1",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
1712,
-384
],
"parameters": {
"name": "paymentLinkAgent",
"workflowId": {
"__rl": true,
"mode": "list",
"value": "PAYLINK-AGENT-ID",
"cachedResultName": "Payment Link Agent"
},
"description": "Create a Stripe payment link for chosen items",
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": []
}
},
"typeVersion": 2
},
{
"id": "965d4268-2fd0-4d8b-9957-38001836ee21",
"name": "LEAD_CRM1",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
1888,
-384
],
"parameters": {
"name": "crmAgent",
"workflowId": {
"__rl": true,
"mode": "list",
"value": "CRM-AGENT-ID",
"cachedResultName": "CRM Agent"
},
"description": "Create/Update lead in CRM (HubSpot/Pipedrive)",
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": []
}
},
"typeVersion": 2
},
{
"id": "d1f0bbeb-4fa0-48a6-907f-33ca8aed1a32",
"name": "ESCALACIÓN_HUMANA1",
"type": "n8n-nodes-base.telegramTool",
"position": [
2096,
-208
],
"webhookId": "ESCALATE-TELEGRAM",
"parameters": {
"text": "={{ $fromAI('Text', '', 'string') }}",
"chatId": "SALES-ESCALATION-CHAT",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "uxQixTID04QTjn2f",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "c3ee1206-bc01-499d-a687-fb044d0996e8",
"name": "Borrado Qdrant1",
"type": "n8n-nodes-base.httpRequest",
"position": [
432,
-1216
],
"parameters": {
"url": "=https://xxxxxxxxxx.qdrant.io:6333/collections/sales_docs/points/delete",
"method": "POST",
"options": {},
"jsonBody": "{\n \"filter\": {}\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "NnFliEyH7K6sFnlI",
"name": "Header Auth account"
}
},
"typeVersion": 4.2
},
{
"id": "d901677d-46d4-4891-a289-a626b19f419c",
"name": "Google Drive: Listar1",
"type": "n8n-nodes-base.googleDrive",
"position": [
624,
-1216
],
"parameters": {
"filter": {
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultName": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "DRIVE_FOLDER_ID",
"cachedResultName": "Sales Docs"
}
},
"options": {},
"resource": "fileFolder"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "7ksMk3zwMvT2CToN",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "ac729d26-43f7-46db-ad7c-81523ebaa0a8",
"name": "Google Drive: Descargar1",
"type": "n8n-nodes-base.googleDrive",
"position": [
832,
-1216
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {
"googleFileConversion": {
"conversion": {
"docsToFormat": "text/plain"
}
}
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "7ksMk3zwMvT2CToN",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "936e6bf5-06f3-469d-82e6-04b4e6f5d9fe",
"name": "Cargador de Datos Predeterminado1",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
1120,
-1024
],
"parameters": {
"options": {},
"dataType": "binary"
},
"typeVersion": 1
},
{
"id": "12b5d80d-3c78-47e4-960c-93396dc6a252",
"name": "Separador por Tokens1",
"type": "@n8n/n8n-nodes-langchain.textSplitterTokenSplitter",
"position": [
1120,
-880
],
"parameters": {
"chunkSize": 300,
"chunkOverlap": 30
},
"typeVersion": 1
},
{
"id": "aedd2f0f-fd7b-4f44-b8c7-fa497e9b8485",
"name": "Embeddings OpenAI (build)1",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
992,
-1008
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "TmPSRVY5JCpWCR5d",
"name": "OpenAi account"
}
},
"typeVersion": 1.1
},
{
"id": "db9980d3-176b-4236-b002-ec552c023118",
"name": "Almacén Vectorial Qdrant (insertar)1",
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"position": [
1040,
-1216
],
"parameters": {
"mode": "insert",
"options": {},
"qdrantCollection": {
"__rl": true,
"mode": "list",
"value": "sales_docs",
"cachedResultName": "sales_docs"
}
},
"credentials": {
"qdrantApi": {
"id": "WuffyG4RFaqOwLb4",
"name": "QdrantApi account"
}
},
"typeVersion": 1
},
{
"id": "6ce8870c-9150-44cb-86e2-ef55a2f0931f",
"name": "Modelo de Chat Google Gemini1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1536,
-64
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "Atcc45Iqep6u15qs",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "7d78df3f-98d7-4d53-af20-ad6dd1ca1d3c",
"name": "Nota Adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
208,
-320
],
"parameters": {
"color": 5,
"width": 528,
"height": 320,
"content": "🛒 **WooCommerce AI Sales Agent – Overview**\n\nThis workflow turns n8n into an **AI-powered sales assistant** for WooCommerce. \nIt can: \n- Detect customer intent (FAQ, product search, payment, lead capture). \n- Search products directly in WooCommerce and show stock details. \n- Answer FAQs using RAG with Qdrant + Google Drive documents. \n- Generate Stripe payment links for checkout. \n- Capture leads into CRM (HubSpot/Pipedrive). \n- Escalate unclear cases to human agents via Telegram. \n\nResult: A **24/7 automated sales agent** that helps customers from discovery → payment → lead capture.\n"
},
"typeVersion": 1
},
{
"id": "6462a494-08bc-43ef-ac60-405f1a5861bb",
"name": "Nota Adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-496,
-720
],
"parameters": {
"color": 3,
"width": 528,
"height": 256,
"content": "⚙️ **Setup & Customization Notes**\n\nBefore using this workflow: \n1. 🔑 Connect credentials: WooCommerce API, Stripe, CRM, Google Drive, OpenAI/Gemini, Qdrant, Telegram. \n2. 🌍 Adjust language/localization (`hl`, `gl`) if needed for your market. \n3. 📂 Update Google Drive folder ID where your sales docs are stored. \n4. 🗑️ Use “Qdrant Wipe” if you want to re-index fresh documents. \n5. ✏️ Customize agent’s response style (formal, casual, short/long) in the `Sales AI Agent` system prompt. \n"
},
"typeVersion": 1
},
{
"id": "e2641b81-60fb-48c2-b763-a3b55864fa44",
"name": "Nota Adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
208,
-1056
],
"parameters": {
"color": 5,
"width": 528,
"height": 352,
"content": "📂 **Knowledge Base Update Flow**\n\nPurpose: Keeps the AI’s FAQ knowledge accurate and up to date. \n\nHow it works: \n1. **Trigger (Manual Execute)** → Run when you want to refresh the knowledge base. \n2. **Qdrant Wipe** → Clears all old vectors. \n3. **Google Drive List & Download** → Loads all sales/policy documents from the configured folder. \n4. **Splitter + Embeddings** → Splits text into chunks and creates embeddings. \n5. **Qdrant Insert** → Stores embeddings in vector DB for retrieval (RAG). \n\n💡 Use this flow whenever sales policies, product docs, or FAQs are updated. \n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"c3d1075f-e019-4e47-92ca-0efc5d937c3f": {
"ai_tool": [
[
{
"node": "562d9402-9902-4eb3-a6ca-a87f388b45e7",
"type": "ai_tool",
"index": 0
}
]
]
},
"965d4268-2fd0-4d8b-9957-38001836ee21": {
"ai_tool": [
[
{
"node": "562d9402-9902-4eb3-a6ca-a87f388b45e7",
"type": "ai_tool",
"index": 0
}
]
]
},
"b9a981fb-41eb-455a-9078-f91bdbed110d": {
"main": [
[
{
"node": "f4c91458-29e6-4814-a64d-e512ac5da230",
"type": "main",
"index": 0
}
]
]
},
"c3ee1206-bc01-499d-a687-fb044d0996e8": {
"main": [
[
{
"node": "d901677d-46d4-4891-a289-a626b19f419c",
"type": "main",
"index": 0
}
]
]
},
"68eb6073-8be1-4f3b-88fc-9c28fa7b8a63": {
"ai_tool": [
[
{
"node": "562d9402-9902-4eb3-a6ca-a87f388b45e7",
"type": "ai_tool",
"index": 0
}
]
]
},
"12b5d80d-3c78-47e4-960c-93396dc6a252": {
"ai_textSplitter": [
[
{
"node": "936e6bf5-06f3-469d-82e6-04b4e6f5d9fe",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"d1f0bbeb-4fa0-48a6-907f-33ca8aed1a32": {
"ai_tool": [
[
{
"node": "562d9402-9902-4eb3-a6ca-a87f388b45e7",
"type": "ai_tool",
"index": 0
}
]
]
},
"d901677d-46d4-4891-a289-a626b19f419c": {
"main": [
[
{
"node": "ac729d26-43f7-46db-ad7c-81523ebaa0a8",
"type": "main",
"index": 0
}
]
]
},
"eb21abb7-76c0-4353-874c-0138a6581b84": {
"ai_tool": [
[
{
"node": "562d9402-9902-4eb3-a6ca-a87f388b45e7",
"type": "ai_tool",
"index": 0
}
]
]
},
"936e6bf5-06f3-469d-82e6-04b4e6f5d9fe": {
"ai_document": [
[
{
"node": "db9980d3-176b-4236-b002-ec552c023118",
"type": "ai_document",
"index": 0
}
]
]
},
"c608958f-cda9-42f2-9ce4-86a02a8e1f0b": {
"ai_tool": [
[
{
"node": "562d9402-9902-4eb3-a6ca-a87f388b45e7",
"type": "ai_tool",
"index": 0
}
]
]
},
"f4c91458-29e6-4814-a64d-e512ac5da230": {
"main": [
[
{
"node": "562d9402-9902-4eb3-a6ca-a87f388b45e7",
"type": "main",
"index": 0
}
]
]
},
"f94da395-1334-4466-8d5a-d300a70f5119": {
"ai_memory": [
[
{
"node": "562d9402-9902-4eb3-a6ca-a87f388b45e7",
"type": "ai_memory",
"index": 0
}
]
]
},
"ac729d26-43f7-46db-ad7c-81523ebaa0a8": {
"main": [
[
{
"node": "db9980d3-176b-4236-b002-ec552c023118",
"type": "main",
"index": 0
}
]
]
},
"6ce8870c-9150-44cb-86e2-ef55a2f0931f": {
"ai_languageModel": [
[
{
"node": "c3d1075f-e019-4e47-92ca-0efc5d937c3f",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"aedd2f0f-fd7b-4f44-b8c7-fa497e9b8485": {
"ai_embedding": [
[
{
"node": "db9980d3-176b-4236-b002-ec552c023118",
"type": "ai_embedding",
"index": 0
}
]
]
},
"2ab2d2c1-5182-49d0-911f-85b6f2349070": {
"ai_languageModel": [
[
{
"node": "562d9402-9902-4eb3-a6ca-a87f388b45e7",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"6ba11958-a915-44d5-828d-5502e020848f": {
"main": [
[
{
"node": "b9a981fb-41eb-455a-9078-f91bdbed110d",
"type": "main",
"index": 0
}
]
]
},
"4cbfa8de-aae7-4d9e-bc76-42e002b92a27": {
"ai_embedding": [
[
{
"node": "5469d03d-4a0f-410f-afc8-09083f697395",
"type": "ai_embedding",
"index": 0
}
]
]
},
"e102585a-a1a8-48b6-afdb-ed4eb69a638e": {
"ai_languageModel": [
[
{
"node": "f4c91458-29e6-4814-a64d-e512ac5da230",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"5469d03d-4a0f-410f-afc8-09083f697395": {
"ai_vectorStore": [
[
{
"node": "c3d1075f-e019-4e47-92ca-0efc5d937c3f",
"type": "ai_vectorStore",
"index": 0
}
]
]
},
"b4c04258-79b5-4c46-94c7-969d837a6857": {
"main": [
[
{
"node": "c3ee1206-bc01-499d-a687-fb044d0996e8",
"type": "main",
"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?
Avanzado - Chatbot de IA, IA Multimodal
¿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
Cong Nguyen
@cong-nguyenI’m a developer specialized in building web and mobile applications with AI integration and intelligent automation. With a solid background in data science, I help businesses build smarter digital solutions using cutting-edge technologies.
Compartir este flujo de trabajo