23 Analizar valor de vida del cliente
Este es unMarket Research, AI Summarizationflujo de automatización del dominio deautomatización que contiene 20 nodos.Utiliza principalmente nodos como If, Set, Code, Gmail, McpClientTool. Analizar y localizar clientes de alto valor con GPT-4 y Bright Data MCP
- •Cuenta de Google y credenciales de API de Gmail
- •Clave de API de OpenAI
Nodos utilizados (20)
{
"id": "wIBHF1QNYzvZZHta",
"meta": {
"instanceId": "60046904b104f0f72b2629a9d88fe9f676be4035769f1f08dad1dd38a76b9480",
"templateCredsSetupCompleted": true
},
"name": "23 Analyze Customer Lifetime Value",
"tags": [],
"nodes": [
{
"id": "a73dd3f9-4d76-46ba-b4bc-9c7035109825",
"name": "Ejecutar Campaña de Ofertas Mensual",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
0
],
"parameters": {
"rule": {
"interval": [
{
"field": "months",
"triggerAtHour": 9
}
]
}
},
"typeVersion": 1.2
},
{
"id": "8b11a03a-71da-4d82-8891-084adcddfd77",
"name": "Establecer URL del historial del cliente",
"type": "n8n-nodes-base.set",
"position": [
200,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "b366b00a-ad35-46ab-9722-6478ded6ec91",
"name": "customer data url",
"type": "string",
"value": "example.com"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "b1f84ba5-90f9-4483-968e-67df657a1936",
"name": "Extraer Perfiles y Pedidos de Clientes (Agente)",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
480,
0
],
"parameters": {
"text": "=scrape the customer history url below and extract the key information:\n{{ $json['customer data url'] }}",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "5aced094-ac88-4033-8a9b-dfc7b1457a6d",
"name": "Bright Data MCP Scraper",
"type": "n8n-nodes-mcp.mcpClientTool",
"position": [
640,
280
],
"parameters": {
"toolName": "scrape_as_markdown",
"operation": "executeTool",
"toolParameters": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tool_Parameters', ``, 'json') }}"
},
"credentials": {
"mcpClientApi": {
"id": "eqq94k789oJCd6jU",
"name": "MCP Client (STDIO) account"
}
},
"typeVersion": 1
},
{
"id": "ef9b75c8-1ec6-43ca-9969-909146214422",
"name": "Asistente de IA",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
440,
280
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8sEyPDkC5p4w4Jha",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "2d7909b4-333c-46cc-9909-5df7fe9bdeb6",
"name": "Formatear Información del Cliente",
"type": "n8n-nodes-base.code",
"position": [
900,
0
],
"parameters": {
"jsCode": "// Get the array inside the 'output' key\nconst customers = items[0].json.output;\n\n// Map each customer to a separate item\nreturn customers.map(customer => {\n return { json: customer };\n});\n"
},
"typeVersion": 2
},
{
"id": "8d562c3e-2e0c-4ba8-8dbe-a89a23ba913b",
"name": "Obtener Historial de Pedidos del Cliente",
"type": "n8n-nodes-base.code",
"position": [
1100,
0
],
"parameters": {
"jsCode": "// Loop through all incoming customers\nconst output = [];\n\nfor (const item of items) {\n const customerName = item.json.customer_name;\n const customerEmail = item.json.customer_email; // Added email extraction\n const orders = item.json.orders;\n\n for (const order of orders) {\n output.push({\n json: {\n customer_name: customerName,\n customer_email: customerEmail, // Added email in output\n amount: order.amount,\n date: order.date\n }\n });\n }\n}\n\nreturn output;\n"
},
"typeVersion": 2
},
{
"id": "02a09456-b359-4989-99b5-c830e9d6ca2a",
"name": "¿Es un Cliente de Alto Valor?",
"type": "n8n-nodes-base.if",
"position": [
1360,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6725053f-eae9-422c-942d-c82279482697",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.amount }}",
"rightValue": 200
}
]
}
},
"typeVersion": 2.2
},
{
"id": "9a0b0647-1341-4159-b639-5b3581548d74",
"name": "Enviar Correo de Oferta Especial",
"type": "n8n-nodes-base.gmail",
"position": [
1580,
-100
],
"webhookId": "f2c94a4c-06f0-43a0-81db-8c728ef0de2f",
"parameters": {
"sendTo": "={{ $json.customer_email }}",
"message": "write any offer",
"options": {},
"subject": "Offer for being out ideal customer"
},
"credentials": {
"gmailOAuth2": {
"id": "AQDSl75AdzK3vmqJ",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "3d73fb01-ab20-4be2-97c7-c21d5c95b45f",
"name": "Ignorar Clientes de Bajo Valor",
"type": "n8n-nodes-base.noOp",
"position": [
1580,
100
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7f81c4d2-d406-4d58-956e-78bca5a8f861",
"name": "Nota Adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-40,
-1020
],
"parameters": {
"color": 2,
"width": 400,
"height": 1200,
"content": "## 🔁 **Section 1: Schedule & Input Setup**\n\n### 🧱 Nodes:\n\n* **🕒 `Run Offer Campaign Daily`**\n* **✏️ `Set Admin Dashboard URL`**\n\n### 📖 What Happens Here:\n\nThis section **initiates the workflow on a regular schedule** (daily, weekly, etc.). It also **sets the URL** of the **admin dashboard** where your customer data is stored.\n\n💡 **Beginner Tip:**\nThis is your starting point. You don't need to manually run the workflow every time — just schedule it, and it will run automatically using the trigger.\n\n✅ **Why it’s useful:**\nYou can run this process daily or weekly to find customers who deserve promotional offers, all on autopilot!\n\n---\n\n"
},
"typeVersion": 1
},
{
"id": "de0d7ee1-b627-4f17-b03e-4076b09166a9",
"name": "Nota Adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
440,
-900
],
"parameters": {
"color": 3,
"width": 340,
"height": 1080,
"content": "## 🤖 **Section 2: Scraping Customer Data with Agent**\n\n### 🧱 Nodes:\n\n* **🤖 `Scrape Customer Profiles & Orders (Agent)`**\n\n * ⚙️ **`AI Assistant (OpenAI Chat Model)`**\n * 🌐 **`Bright Data MCP Scraper`**\n * 🧾 **`Format Agent Output (Structured Output Parser)`**\n\n### 📖 What Happens Here:\n\nThe **AI Agent** (powered by OpenAI and Bright Data MCP) accesses your dashboard and scrapes:\n\n* 📇 **Customer profiles**\n* 🛒 **Their purchase/order history**\n\nThe **Structured Output Parser** then **cleans up and organizes** this data into a format that other nodes can use.\n\n💡 **Beginner Tip:**\nThis is like a smart assistant that goes to your admin dashboard, collects important info, and makes sure it’s readable for the next steps.\n\n✅ **Why it’s useful:**\nEven if the data is messy or complex on the dashboard, this section makes sure it’s clean and ready to use in your automation.\n\n---\n\n"
},
"typeVersion": 1
},
{
"id": "9f5db009-9461-4937-8c88-d55bf47bfe2c",
"name": "Nota Adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
860,
-760
],
"parameters": {
"color": 5,
"width": 360,
"height": 940,
"content": "## 🧩 **Section 3: Data Formatting & Order Extraction**\n\n### 🧱 Nodes:\n\n* **🔧 `Format Customer Info`**\n* **📦 `Get Customer Order History`**\n\n### 📖 What Happens Here:\n\nThese function nodes further **organize and process the scraped data**:\n\n* The first node extracts key customer details like name, email, and ID.\n* The second node focuses on their **order data** — how many items they bought, total amount spent, etc.\n\n💡 **Beginner Tip:**\nThink of this as organizing data into two folders: 🧍♂️ “Customer Info” and 📊 “Purchase Data”.\n\n✅ **Why it’s useful:**\nClean separation of data means better targeting. You'll know exactly **who** bought **what**, and **how much** they spent — perfect for personalized offers!\n\n---\n\n"
},
"typeVersion": 1
},
{
"id": "a46e5710-fb85-46d6-addd-211994597386",
"name": "Nota Adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1320,
-740
],
"parameters": {
"color": 6,
"width": 380,
"height": 1000,
"content": "## 🎯 **Section 4: Offer Decision & Action**\n\n### 🧱 Nodes:\n\n* **💰 `Is Customer High-Value?`**\n* **📧 `Send Special Offer Email`**\n* **➡️ `Ignore Low-Value Customers`**\n\n### 📖 What Happens Here:\n\nThis section **decides what action to take**:\n\n* The \"High Value Check\" compares a customer’s total spending against a fixed threshold.\n* If their spending is **high enough**, they get a personalized **offer email** via Gmail.\n* If not, they’re simply **skipped** — no email is sent.\n\n💡 **Beginner Tip:**\nYou don’t want to send offers to everyone. This smart filter ensures **only loyal/high-value customers** get incentives.\n\n"
},
"typeVersion": 1
},
{
"id": "e32fb60f-390a-4f16-9b81-6b82fda08328",
"name": "Nota Adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1820,
-740
],
"parameters": {
"color": 7,
"width": 380,
"height": 240,
"content": "## I’ll receive a tiny commission if you join Bright Data through this link—thanks for fueling more free content!\n\n### https://get.brightdata.com/1tndi4600b25"
},
"typeVersion": 1
},
{
"id": "a31f7eec-c104-4631-86f3-523e68aab57b",
"name": "Nota Adhesiva9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1780,
-1040
],
"parameters": {
"color": 4,
"width": 1300,
"height": 320,
"content": "=======================================\n WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n - YouTube: https://www.youtube.com/@YaronBeen/videos\n - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"
},
"typeVersion": 1
},
{
"id": "0f4db4d3-102f-4c2c-a456-42bd14e95a76",
"name": "Nota Adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1780,
-700
],
"parameters": {
"color": 4,
"width": 1289,
"height": 2758,
"content": "# 🎯 **Automated High-Value Customer Targeting & Offer Campaign**\n\n### *Smartly scrape, segment, and send personalized offers — all without lifting a finger.*\n\n---\n\n## 🔁 **Section 1: Schedule & Input Setup**\n\n### 🧱 Nodes:\n\n* **🕒 `Run Offer Campaign Daily`**\n* **✏️ `Set Admin Dashboard URL`**\n\n### 📖 What Happens Here:\n\nThis section **initiates the workflow on a regular schedule** (daily, weekly, etc.). It also **sets the URL** of the **admin dashboard** where your customer data is stored.\n\n💡 **Beginner Tip:**\nThis is your starting point. You don't need to manually run the workflow every time — just schedule it, and it will run automatically using the trigger.\n\n✅ **Why it’s useful:**\nYou can run this process daily or weekly to find customers who deserve promotional offers, all on autopilot!\n\n---\n\n## 🤖 **Section 2: Scraping Customer Data with Agent**\n\n### 🧱 Nodes:\n\n* **🤖 `Scrape Customer Profiles & Orders (Agent)`**\n\n * ⚙️ **`AI Assistant (OpenAI Chat Model)`**\n * 🌐 **`Bright Data MCP Scraper`**\n * 🧾 **`Format Agent Output (Structured Output Parser)`**\n\n### 📖 What Happens Here:\n\nThe **AI Agent** (powered by OpenAI and Bright Data MCP) accesses your dashboard and scrapes:\n\n* 📇 **Customer profiles**\n* 🛒 **Their purchase/order history**\n\nThe **Structured Output Parser** then **cleans up and organizes** this data into a format that other nodes can use.\n\n💡 **Beginner Tip:**\nThis is like a smart assistant that goes to your admin dashboard, collects important info, and makes sure it’s readable for the next steps.\n\n✅ **Why it’s useful:**\nEven if the data is messy or complex on the dashboard, this section makes sure it’s clean and ready to use in your automation.\n\n---\n\n## 🧩 **Section 3: Data Formatting & Order Extraction**\n\n### 🧱 Nodes:\n\n* **🔧 `Format Customer Info`**\n* **📦 `Get Customer Order History`**\n\n### 📖 What Happens Here:\n\nThese function nodes further **organize and process the scraped data**:\n\n* The first node extracts key customer details like name, email, and ID.\n* The second node focuses on their **order data** — how many items they bought, total amount spent, etc.\n\n💡 **Beginner Tip:**\nThink of this as organizing data into two folders: 🧍♂️ “Customer Info” and 📊 “Purchase Data”.\n\n✅ **Why it’s useful:**\nClean separation of data means better targeting. You'll know exactly **who** bought **what**, and **how much** they spent — perfect for personalized offers!\n\n---\n\n## 🎯 **Section 4: Offer Decision & Action**\n\n### 🧱 Nodes:\n\n* **💰 `Is Customer High-Value?`**\n* **📧 `Send Special Offer Email`**\n* **➡️ `Ignore Low-Value Customers`**\n\n### 📖 What Happens Here:\n\nThis section **decides what action to take**:\n\n* The \"High Value Check\" compares a customer’s total spending against a fixed threshold.\n* If their spending is **high enough**, they get a personalized **offer email** via Gmail.\n* If not, they’re simply **skipped** — no email is sent.\n\n💡 **Beginner Tip:**\nYou don’t want to send offers to everyone. This smart filter ensures **only loyal/high-value customers** get incentives.\n\n✅ **Why it’s useful:**\nIt automates your **customer segmentation** and **email marketing**, saving you time while targeting the right people to boost sales.\n\n---\n\n## 🎉 Final Thoughts\n\nThis workflow is a **powerful marketing automation tool**. Here's what it empowers you to do:\n\n* ⏰ Run promotions on autopilot\n* 🧠 Use AI and proxies to collect data\n* 🧹 Organize complex customer records\n* 🎯 Only target the most valuable users\n* 📈 Increase conversion rates with personalized emails\n\n---\n\n"
},
"typeVersion": 1
},
{
"id": "e7eec1fb-1a84-44be-8b8c-ab6fa4acbc1c",
"name": "Auto-fixing Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
"position": [
780,
280
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "3e4a7bfa-5ba6-4abb-8dac-72eeee8263a4",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
760,
500
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8sEyPDkC5p4w4Jha",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "6ba75ee7-46ea-4388-b5c2-b5ab2d4aecc1",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
920,
500
],
"parameters": {
"jsonSchemaExample": "[\n {\n \"customer_name\": \"John Doe\",\n \"orders\": [\n {\n \"amount\": 120,\n \"date\": \"2024-05-10\"\n },\n {\n \"amount\": 80,\n \"date\": \"2024-06-15\"\n }\n ]\n },\n {\n \"customer_name\": \"Jane Smith\",\n \"orders\": [\n {\n \"amount\": 200,\n \"date\": \"2024-04-05\"\n },\n {\n \"amount\": 150,\n \"date\": \"2024-05-01\"\n },\n {\n \"amount\": 180,\n \"date\": \"2024-06-10\"\n }\n ]\n },\n {\n \"customer_name\": \"Michael Johnson\",\n \"orders\": [\n {\n \"amount\": 600,\n \"date\": \"2024-07-01\"\n }\n ]\n }\n]\n"
},
"typeVersion": 1.2
}
],
"active": false,
"pinData": {
"Scrape Customer Profiles & Orders (Agent)": [
{
"json": {
"output": [
{
"orders": [
{
"date": "2024-05-10",
"amount": 120
},
{
"date": "2024-06-15",
"amount": 80
}
],
"customer_name": "John Doe",
"customer_email": "johndoe@gmail.com"
},
{
"orders": [
{
"date": "2024-04-05",
"amount": 200
},
{
"date": "2024-05-01",
"amount": 150
},
{
"date": "2024-06-10",
"amount": 180
}
],
"customer_name": "Jane Smith",
"customer_email": "johnsmith@gmail.com"
},
{
"orders": [
{
"date": "2024-07-01",
"amount": 600
}
],
"customer_name": "Michael Johnson",
"customer_email": "michael@gmail.com"
}
]
}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "f2ffb3ba-6efc-493d-93c6-6a2e99e8c2d8",
"connections": {
"ef9b75c8-1ec6-43ca-9969-909146214422": {
"ai_languageModel": [
[
{
"node": "b1f84ba5-90f9-4483-968e-67df657a1936",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"3e4a7bfa-5ba6-4abb-8dac-72eeee8263a4": {
"ai_languageModel": [
[
{
"node": "e7eec1fb-1a84-44be-8b8c-ab6fa4acbc1c",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"2d7909b4-333c-46cc-9909-5df7fe9bdeb6": {
"main": [
[
{
"node": "8d562c3e-2e0c-4ba8-8dbe-a89a23ba913b",
"type": "main",
"index": 0
}
]
]
},
"5aced094-ac88-4033-8a9b-dfc7b1457a6d": {
"ai_tool": [
[
{
"node": "b1f84ba5-90f9-4483-968e-67df657a1936",
"type": "ai_tool",
"index": 0
}
]
]
},
"02a09456-b359-4989-99b5-c830e9d6ca2a": {
"main": [
[
{
"node": "9a0b0647-1341-4159-b639-5b3581548d74",
"type": "main",
"index": 0
}
],
[
{
"node": "3d73fb01-ab20-4be2-97c7-c21d5c95b45f",
"type": "main",
"index": 0
}
]
]
},
"8b11a03a-71da-4d82-8891-084adcddfd77": {
"main": [
[
{
"node": "b1f84ba5-90f9-4483-968e-67df657a1936",
"type": "main",
"index": 0
}
]
]
},
"6ba75ee7-46ea-4388-b5c2-b5ab2d4aecc1": {
"ai_outputParser": [
[
{
"node": "e7eec1fb-1a84-44be-8b8c-ab6fa4acbc1c",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"e7eec1fb-1a84-44be-8b8c-ab6fa4acbc1c": {
"ai_outputParser": [
[
{
"node": "b1f84ba5-90f9-4483-968e-67df657a1936",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"8d562c3e-2e0c-4ba8-8dbe-a89a23ba913b": {
"main": [
[
{
"node": "02a09456-b359-4989-99b5-c830e9d6ca2a",
"type": "main",
"index": 0
}
]
]
},
"a73dd3f9-4d76-46ba-b4bc-9c7035109825": {
"main": [
[
{
"node": "8b11a03a-71da-4d82-8891-084adcddfd77",
"type": "main",
"index": 0
}
]
]
},
"b1f84ba5-90f9-4483-968e-67df657a1936": {
"main": [
[
{
"node": "2d7909b4-333c-46cc-9909-5df7fe9bdeb6",
"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 - Investigación de mercado, Resumen 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
Yaron Been
@yaron-nofluffBuilding AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos
Compartir este flujo de trabajo