Soporte de pedidos de WooCommerce en WhatsApp/Telegram
Este es unSupport Chatbot, AI Chatbotflujo de automatización del dominio deautomatización que contiene 25 nodos.Utiliza principalmente nodos como Set, Gmail, Merge, Switch, Telegram. Automatización del soporte al cliente de WooCommerce con Gemini, GPT, Telegram y Gmail
- •Cuenta de Google y credenciales de API de Gmail
- •Bot Token de Telegram
- •Clave de API de OpenAI
- •Clave de API de Google Gemini
Nodos utilizados (25)
Categoría
{
"id": "4w6vXQK63QpwF3JW",
"meta": {
"instanceId": "f50c4225657041a867073dfd116003f9f3659e08e71fb6a5bb5c90807373de2c",
"templateCredsSetupCompleted": true
},
"name": "Whatsapp/Telegram WooCommerce Order support",
"tags": [],
"nodes": [
{
"id": "2835d72f-10eb-4b94-8e56-90413c74e89a",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
1072,
1312
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "653d7db3-92d9-49e0-8f9e-a914bfb0754c",
"name": "Obtener un pedido en WooCommerce",
"type": "n8n-nodes-base.wooCommerceTool",
"position": [
2224,
1616
],
"parameters": {
"orderId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Order_ID', ``, 'string') }}",
"resource": "order",
"operation": "get"
},
"credentials": {
"wooCommerceApi": {
"id": "VcCK1mcn5dJXCE8v",
"name": "WooCommerce account"
}
},
"typeVersion": 1
},
{
"id": "e5582697-96c2-41e1-b535-c1792bcfe362",
"name": "Recuperar consulta del usuario",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
672,
1024
],
"webhookId": "b9ec78fc-178e-44fa-be5f-7b174f2e5921",
"parameters": {
"updates": [
"message",
"*"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "YlmcnSgYYsULTVHI",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "b43894b4-bbc2-42f5-8be2-31283c2623c1",
"name": "Recuperar correo de soporte",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
672,
1472
],
"parameters": {
"simple": false,
"filters": {
"readStatus": "unread"
},
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"credentials": {
"gmailOAuth2": {
"id": "LijDETbM9Mct4ycg",
"name": "Gmail account"
}
},
"typeVersion": 1.2
},
{
"id": "601f74d3-b435-4612-9ce5-eb7249f10d1f",
"name": "Modelo principal [Gemini 2.5 Flash]",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1504,
1600
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "KbJ7zta7PFGQpS8v",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "ae55ba67-1a8e-4415-996d-1431529ffb25",
"name": "Modelo alternativo [GPT 4.1 mini]",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1648,
1600
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "jLsJ8GoQRONiXr61",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "a1ad0dde-d2e9-48c6-bc27-a9cfa046f0b7",
"name": "Memoria de conversación",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1936,
1600
],
"parameters": {
"sessionKey": "={{ $('Set Manual Fields').item.json.conversation_id }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "52e1e028-60aa-4f26-9e01-fed0c3637266",
"name": "Establecer campos manuales",
"type": "n8n-nodes-base.set",
"position": [
1456,
1312
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "5595792e-a575-4e1c-9bbd-5b398f79613d",
"name": "platform",
"type": "string",
"value": "={{ $json.message ? 'telegram' : 'gmail' }}"
},
{
"id": "acab6a28-4cc4-430d-8f1d-32bb46e6ddae",
"name": "sender_id",
"type": "string",
"value": "={{ $json.message ? $json.message.chat.id : $json.from.value[0].address }}"
},
{
"id": "a2215038-320e-4130-a2e7-6e220c2ba614",
"name": "query_text",
"type": "string",
"value": "={{ $json.message ? $json.message.text : ($json.text || $json.snippet) }}"
},
{
"id": "155368c4-3720-45c3-88a8-32afe2d7cedd",
"name": "reply_to_id",
"type": "string",
"value": "={{ $json.id }}"
},
{
"id": "7fbf6c01-9f2b-4326-8307-db17688f4cf2",
"name": "conversation_id",
"type": "string",
"value": "={{ $json.message ? $json.message.chat.id : $json.threadId }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "873e594c-9a80-43fd-bb5b-697945fca750",
"name": "Responder en plataforma específica",
"type": "n8n-nodes-base.switch",
"position": [
2320,
1312
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Telegram",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "5dac6afb-45bd-47a8-9a4b-d1bcbbe25f02",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Set Manual Fields').item.json.platform }}",
"rightValue": "=telegram"
}
]
},
"renameOutput": true
},
{
"outputKey": "Mail",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "2d5cbefc-3d7b-4015-89e4-1c612b5c1791",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Set Manual Fields').item.json.platform }}",
"rightValue": "gmail"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "21780180-84e5-4b4c-8ed0-2fa5056ba4c9",
"name": "Enviar respuesta Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
2672,
1120
],
"webhookId": "81d481f5-4374-4e96-b910-0e310320469b",
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Set Manual Fields').item.json.sender_id }}",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "YlmcnSgYYsULTVHI",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "33a5bc09-4397-4960-8888-c955739052ed",
"name": "Enviar respuesta por correo",
"type": "n8n-nodes-base.gmail",
"position": [
2672,
1424
],
"webhookId": "e0201351-c15b-40d8-a106-c6dfc22b96f4",
"parameters": {
"message": "={{ $json.output }}",
"options": {},
"emailType": "text",
"messageId": "={{ $('Set Manual Fields').item.json.reply_to_id }}",
"operation": "reply"
},
"credentials": {
"gmailOAuth2": {
"id": "LijDETbM9Mct4ycg",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "a050a96b-7439-49ad-b98d-237cb952faf8",
"name": "Marcar correo recibido como leído",
"type": "n8n-nodes-base.gmail",
"position": [
3040,
1424
],
"webhookId": "40866be3-0ed6-4104-8dcb-7112eed93e6e",
"parameters": {
"messageId": "={{ $('Set Manual Fields').item.json.reply_to_id }}",
"operation": "markAsRead"
},
"credentials": {
"gmailOAuth2": {
"id": "LijDETbM9Mct4ycg",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "8c082d22-44b4-44e0-8847-b588985cd8b8",
"name": "Agente de soporte WooCommerce Customer support Agent1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1840,
1312
],
"parameters": {
"text": "=You are a specialized customer support assistant for a WooCommerce store communicating via {{ $json.platform }}. Your one and only capability is to retrieve information about a customer's order.\n\nYou have access to a single tool: `Get an order in WooCommerce`. This tool requires an Order ID to work.\n\nFollow these rules strictly:\n\n1. If the user asks about their order and provides a number that looks like an Order ID, use the `Get an order in WooCommerce` tool with that ID to find their order details.\n2. If the user asks about their order status (e.g., \"Where is my package?\") but does NOT provide an Order ID, you MUST ask them for it. Do not attempt to answer without the ID. Simply respond with: \"I can help with that. Could you please provide your Order ID?\"\n3. If the user asks any other question that is not about finding a specific order (e.g., \"What products do you have?\", \"What is your return policy?\", or general small talk), you must politely decline and state your purpose. Respond with: \"I can only assist with inquiries about existing orders. If you have an order you'd like to check on, please provide the Order ID.\"\n\n\n**Users Query:** {{ $json.query_text }}",
"options": {},
"promptType": "define",
"needsFallback": true
},
"typeVersion": 2.2
},
{
"id": "3e44e6e8-dc34-4b26-9ee5-1c3cc82974c3",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
544,
832
],
"parameters": {
"width": 368,
"height": 400,
"content": "## ✈️ Fetch user query\n\n* Acts as the real-time entry point for Telegram.\n* Uses a webhook for instant triggering.\n* Captures user message and chat ID.\n"
},
"typeVersion": 1
},
{
"id": "2817c251-4b9d-4a30-9279-d6a9395ec4e1",
"name": "Nota adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
544,
1248
],
"parameters": {
"color": 7,
"width": 368,
"height": 400,
"content": "## 📥 Fetch support mail\n\n* Polls the Gmail inbox every minute.\n* Filters for `UNREAD` emails only.\n* \"Get Message\" option is ON to fetch the full body and headers.\n"
},
"typeVersion": 1
},
{
"id": "be7c848b-7187-453c-b3f3-1d3594c06b14",
"name": "Nota adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
928,
1024
],
"parameters": {
"color": 2,
"width": 368,
"height": 464,
"content": "## 🔀 Merge\n\n* Unifies inputs from all triggers (Telegram & Gmail).\n* Creates a single data stream for processing.\n"
},
"typeVersion": 1
},
{
"id": "cb002988-3e3d-4168-b21c-c81d7d87937b",
"name": "Nota adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1312,
1024
],
"parameters": {
"color": 6,
"width": 384,
"height": 464,
"content": "## 🏷️ Set Manual Fields\n\n* Normalizes data from all platforms into a standard format.\n* Creates universal fields like `platform`, `sender_id`, and `query_text`.\n* **CRUCIAL:** Makes the rest of the workflow channel-agnostic."
},
"typeVersion": 1
},
{
"id": "f7526f40-942d-4697-89d1-c66873a36173",
"name": "Nota adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1712,
1024
],
"parameters": {
"color": 3,
"width": 480,
"height": 464,
"content": "## 🧠 WooCommerce Customer support Agent\n\n- **Function:** Acts as the AI \"brain\" to understand user intent, use tools, and formulate replies.\n- **Input:** The normalized `query_text`, conversation history from Memory, and available Tools.\n- **Output:** A JSON object containing the final `output` text to be sent to the user.\n- **Note:** This node orchestrates the entire conversation and logic flow."
},
"typeVersion": 1
},
{
"id": "e712bf53-d3d3-4dca-8a84-3b35b66ffb28",
"name": "Nota adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1424,
1504
],
"parameters": {
"color": 5,
"width": 400,
"height": 400,
"content": "## 🚀 AI Language Engines\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n* Provide the language processing power for the AI Agent.\n* Uses Primary (Gemini) first, then Fallback (GPT) on error.\n* Ensures high reliability for the bot.\n"
},
"typeVersion": 1
},
{
"id": "d1e67a2c-07db-409f-88da-31f2c8fa29e6",
"name": "Nota adhesiva6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1840,
1504
],
"parameters": {
"color": 4,
"width": 272,
"height": 400,
"content": "## 📜 Conversation Memory\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n* Provides short-term memory to the AI Agent.\n* Uses `conversation_id` to track individual conversations.\n* Essential for handling follow-up questions."
},
"typeVersion": 1
},
{
"id": "889b0dbc-f2eb-4a01-96f6-1ace353ed96a",
"name": "Nota adhesiva7",
"type": "n8n-nodes-base.stickyNote",
"position": [
2128,
1504
],
"parameters": {
"width": 272,
"height": 400,
"content": "## 🛒 Get an order from WooCommerce\n\n\n\n\n\n\n\n\n\n\n\n\n\n* A specialized \"Tool\" available to the AI Agent.\n* Connects to WooCommerce to fetch order details.\n* Only runs when called by the agent with a valid Order ID.\n\n"
},
"typeVersion": 1
},
{
"id": "cda68193-1a66-4fb6-81a8-5aaa00e65056",
"name": "Nota adhesiva8",
"type": "n8n-nodes-base.stickyNote",
"position": [
2208,
1024
],
"parameters": {
"color": 7,
"width": 320,
"height": 464,
"content": "## 📮 Reply to Specific Platform\n\n* Routes the AI's final response to the correct channel.\n* Checks the `platform` field ('telegram' or 'gmail').\n* Ensures replies are sent back to the source platform.\n"
},
"typeVersion": 1
},
{
"id": "a2c815cc-71bf-4253-ac53-1d0e219fbb07",
"name": "Nota adhesiva9",
"type": "n8n-nodes-base.stickyNote",
"position": [
2544,
944
],
"parameters": {
"color": 2,
"width": 352,
"height": 352,
"content": "## 🗣️ Send Telegram Response\n\n* Final action for the Telegram path.\n* Sends the AI's response to the user's chat ID.\n\n\n\n"
},
"typeVersion": 1
},
{
"id": "0c96b670-31c1-44bc-8b9b-b3aa9ce51f8e",
"name": "Nota adhesiva10",
"type": "n8n-nodes-base.stickyNote",
"position": [
2544,
1312
],
"parameters": {
"color": 6,
"width": 352,
"height": 400,
"content": "## 📨 Send Response via Mail\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n* Final action for the Gmail path.\n* Sends the AI's response as a threaded email reply.\n* Uses the `reply_to_id` to maintain the conversation thread."
},
"typeVersion": 1
},
{
"id": "dd7376e7-724b-40af-8fe4-8abec4c711c7",
"name": "Nota adhesiva11",
"type": "n8n-nodes-base.stickyNote",
"position": [
2912,
1312
],
"parameters": {
"color": 4,
"width": 336,
"height": 400,
"content": "## 🚫 Mark received mail as read\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n* Vital control node for the Gmail trigger.\n* Marks the original incoming email as 'Read' after processing.\n* CRITICAL: Prevents infinite reply loops."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "938f9a4c-e86d-4219-aa44-8118b0bdb6ec",
"connections": {
"2835d72f-10eb-4b94-8e56-90413c74e89a": {
"main": [
[
{
"node": "52e1e028-60aa-4f26-9e01-fed0c3637266",
"type": "main",
"index": 0
}
]
]
},
"e5582697-96c2-41e1-b535-c1792bcfe362": {
"main": [
[
{
"node": "2835d72f-10eb-4b94-8e56-90413c74e89a",
"type": "main",
"index": 0
}
]
]
},
"52e1e028-60aa-4f26-9e01-fed0c3637266": {
"main": [
[
{
"node": "8c082d22-44b4-44e0-8847-b588985cd8b8",
"type": "main",
"index": 0
}
]
]
},
"b43894b4-bbc2-42f5-8be2-31283c2623c1": {
"main": [
[
{
"node": "2835d72f-10eb-4b94-8e56-90413c74e89a",
"type": "main",
"index": 1
}
]
]
},
"a1ad0dde-d2e9-48c6-bc27-a9cfa046f0b7": {
"ai_memory": [
[
{
"node": "8c082d22-44b4-44e0-8847-b588985cd8b8",
"type": "ai_memory",
"index": 0
}
]
]
},
"33a5bc09-4397-4960-8888-c955739052ed": {
"main": [
[
{
"node": "a050a96b-7439-49ad-b98d-237cb952faf8",
"type": "main",
"index": 0
}
]
]
},
"873e594c-9a80-43fd-bb5b-697945fca750": {
"main": [
[
{
"node": "21780180-84e5-4b4c-8ed0-2fa5056ba4c9",
"type": "main",
"index": 0
}
],
[
{
"node": "33a5bc09-4397-4960-8888-c955739052ed",
"type": "main",
"index": 0
}
]
]
},
"653d7db3-92d9-49e0-8f9e-a914bfb0754c": {
"ai_tool": [
[
{
"node": "8c082d22-44b4-44e0-8847-b588985cd8b8",
"type": "ai_tool",
"index": 0
}
]
]
},
"ae55ba67-1a8e-4415-996d-1431529ffb25": {
"ai_languageModel": [
[
{
"node": "8c082d22-44b4-44e0-8847-b588985cd8b8",
"type": "ai_languageModel",
"index": 1
}
]
]
},
"601f74d3-b435-4612-9ce5-eb7249f10d1f": {
"ai_languageModel": [
[
{
"node": "8c082d22-44b4-44e0-8847-b588985cd8b8",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"8c082d22-44b4-44e0-8847-b588985cd8b8": {
"main": [
[
{
"node": "873e594c-9a80-43fd-bb5b-697945fca750",
"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 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.
Flujos de trabajo relacionados recomendados
AppStoneLab Technologies LLP
@appstonelabDive into the digital era with a trusted partner. From idea to execution, we transform visions into interactive realities. Let's shape the future, together.
Compartir este flujo de trabajo