Automatización de la recopilación y procesamiento de respuestas de encuestas NPS con GoHighLevel, Gmail y Notion
Este es unContent Creation, Multimodal AIflujo de automatización del dominio deautomatización que contiene 27 nodos.Utiliza principalmente nodos como If, Code, Gmail, Notion, HighLevel. Automatizar la recopilación de encuestas NPS y el procesamiento de respuestas con GoHighLevel, Gmail y Notion
- •Cuenta de Google y credenciales de API de Gmail
- •Clave de API de Notion
- •Pueden requerirse credenciales de autenticación para la API de destino
Nodos utilizados (27)
Categoría
{
"id": "6l4TRFLY8lVlID78",
"meta": {
"instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177",
"templateCredsSetupCompleted": true
},
"name": "Automate NPS Survey Collection & Response Handling with GoHighLevel, Gmail, and Notion",
"tags": [],
"nodes": [
{
"id": "98ddd287-3cf1-4455-b0b7-359d6dd0c408",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1200,
-512
],
"parameters": {
"color": 5,
"width": 389,
"height": 656,
"content": "## 📋 NPS Survey Automation Workflow\n\n### What This Workflow Does:\nThis workflow automatically sends NPS (Net Promoter Score) surveys to clients when their deals are marked as \"won\" in GoHighLevel CRM, then processes responses and takes action based on feedback scores.\n\n### Key Features:\n- ✅ Automatically detects completed deals from GHL\n- 📧 Sends beautiful NPS survey emails to clients\n- 📊 Collects and parses NPS responses\n- 🎯 Routes feedback based on score (Promoters vs Detractors)\n- 📝 Logs all feedback in Notion database\n- 🔄 Updates GHL custom fields to prevent duplicate surveys\n\n### Setup Requirements:\n1. GoHighLevel account with OAuth2 credentials\n2. Gmail account for sending/receiving emails\n3. Notion account with NPS database\n4. Custom fields in GHL: `nps_survey_sent`, `nps_sent_date`\n\n"
},
"typeVersion": 1
},
{
"id": "5612db2f-264b-4b9e-b193-f045eb140c40",
"name": "Nota adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-704,
-512
],
"parameters": {
"width": 300,
"height": 320,
"content": "## 🔍 Fetch Won Opportunities\n\nThis node retrieves all opportunities with status=\"won\" from GoHighLevel.\n\n**Important:** Make sure your GHL account has:\n- Custom field: `nps_survey_sent` (boolean)\n- Custom field: `nps_sent_date` (date)\n\n**Runs:** Every hour via schedule trigger"
},
"typeVersion": 1
},
{
"id": "6a69ad15-0e00-4ea9-9bed-f84133477e5a",
"name": "Nota adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
-448
],
"parameters": {
"width": 280,
"height": 256,
"content": "## ✅ Filter & Validate Deals\n\nFilters deals to find:\n- Status = \"won\"\n- NPS survey NOT yet sent\n- Valid email address exists\n\nSkips deals without email or already surveyed."
},
"typeVersion": 1
},
{
"id": "a76c0b72-99be-4acc-a5b6-6abd68e51cf4",
"name": "Nota adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
-528
],
"parameters": {
"width": 280,
"height": 308,
"content": "## 📧 Send NPS Survey\n\nSends a beautiful HTML email with:\n- 0-10 rating scale\n- Mailto links for easy response\n- Client personalization\n- Deal information embedded\n\n**Note:** Responses come back via email with pre-filled data"
},
"typeVersion": 1
},
{
"id": "35b277ef-863e-4642-a183-9ff78db51609",
"name": "Nota adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-928,
384
],
"parameters": {
"width": 300,
"height": 312,
"content": "## 📥 Collect Responses\n\nWeekly schedule checks Gmail for:\n- Unread NPS response emails\n- Received after Oct 1, 2025\n- Extracts score and feedback\n\n**Categorizes as:**\n- Promoter: 9-10\n- Passive: 7-8\n- Detractor: 0-6"
},
"typeVersion": 1
},
{
"id": "3f201e66-dc0b-48ce-84d0-444315c29bfd",
"name": "Nota adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
320
],
"parameters": {
"width": 320,
"height": 316,
"content": "## 🎯 Route Based on Score\n\n**If Score > 7 (Promoter/Passive):**\n- Log in Notion as positive feedback\n- Send thank you email\n- Request testimonial/review\n\n**If Score ≤ 7 (Detractor):**\n- Create support ticket in Notion\n- Alert team via email\n- Priority follow-up within 24h"
},
"typeVersion": 1
},
{
"id": "02919d71-92cf-40f1-9ab7-357cd411e8f4",
"name": "Obtener oportunidades ganadas de GHL",
"type": "n8n-nodes-base.highLevel",
"position": [
-272,
-176
],
"parameters": {
"filters": {
"status": "won"
},
"resource": "opportunity",
"operation": "getAll",
"returnAll": true,
"requestOptions": {}
},
"credentials": {
"highLevelOAuth2Api": {
"id": "5QWHSi134dLIBEsC",
"name": "HighLevel account"
}
},
"typeVersion": 2
},
{
"id": "97d39aee-3ed7-483d-98b2-fc145ca2fd7e",
"name": "Activador: Verificar cada hora",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-496,
-176
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "90f67410-7777-4a7f-a764-7bffc0b83da1",
"name": "Filtrar tratos completos no encuestados",
"type": "n8n-nodes-base.code",
"onError": "continueErrorOutput",
"position": [
-48,
-176
],
"parameters": {
"jsCode": "// Filter deals with status = 'won' and not yet surveyed\nconst deals = $input.all();\nconst completedDeals = [];\n\nfor (const deal of deals) {\n const data = deal.json;\n \n // Check if deal status is 'won' (completed in GHL)\n if (data.status && data.status.toLowerCase() === 'won') {\n \n // Check if NPS survey was already sent\n let npsSent = false;\n if (data.customFields && Array.isArray(data.customFields)) {\n const npsField = data.customFields.find(field => field.key === 'nps_survey_sent');\n npsSent = npsField ? npsField.value === true || npsField.value === 'true' : false;\n }\n \n // Only process deals where survey hasn't been sent\n if (!npsSent) {\n // Extract contact details\n const contact = data.contact || {};\n const email = contact.email || '';\n const phone = contact.phone || '';\n \n // Skip if no email (can't send survey)\n if (!email) {\n console.log(`Skipping deal ${data.id} - no email found`);\n continue;\n }\n \n completedDeals.push({\n json: {\n dealId: data.id,\n clientName: contact.name || 'Client',\n clientEmail: email,\n clientPhone: phone,\n dealValue: data.monetaryValue || 0,\n completedDate: data.lastStatusChangeAt || new Date().toISOString(),\n contactId: contact.id || '',\n companyName: contact.companyName || '',\n pipelineId: data.pipelineId || '',\n hasDeals: true\n }\n });\n }\n }\n}\n\n// Return appropriate response\nif (completedDeals.length === 0) {\n return [{ json: { hasDeals: false, message: 'No new completed deals found', count: 0 } }];\n}\n\nconsole.log(`Found ${completedDeals.length} completed deals ready for NPS survey`);\nreturn completedDeals;"
},
"typeVersion": 2
},
{
"id": "8306f5d0-8a9b-405d-ac4b-55d1397c6f8c",
"name": "Verificar si existen tratos válidos",
"type": "n8n-nodes-base.if",
"position": [
208,
-192
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "13f3a917-bcdf-47a0-bcbc-40349e5b4b64",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.hasDeals }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2
},
{
"id": "10f2bf7b-6360-477d-b3fa-0d4a0f6ea275",
"name": "Extraer puntuación NPS del correo",
"type": "n8n-nodes-base.code",
"position": [
-272,
160
],
"parameters": {
"jsCode": "// Extract NPS score and details from email snippet\nconst emailData = $input.first().json;\nconst snippet = emailData.snippet || '';\n\n// Extract score from snippet (e.g., \"Score: 2\")\nconst scoreMatch = snippet.match(/Score:\\s*(\\d+)/);\nconst score = scoreMatch ? parseInt(scoreMatch[1]) : 0;\n\n// Extract deal ID from snippet\nconst dealIdMatch = snippet.match(/Deal ID:\\s*([^\\s]+)/);\n\n// Extract client name from snippet\nconst clientMatch = snippet.match(/Client:\\s*([^\\n\\r]+?)(?=\\s*Email:|$)/);\n\n// Extract email from snippet\nconst emailMatch = snippet.match(/Email:\\s*([^\\s]+)/);\n\n// Extract feedback (everything after \"Please share your feedback:\")\nconst feedbackMatch = snippet.match(/Please share your feedback:\\s*([\\s\\S]*)/);\n\nreturn [{\n json: {\n dealId: dealIdMatch ? dealIdMatch[1].trim() : '',\n clientName: clientMatch ? clientMatch[1].trim() : '',\n clientEmail: emailMatch ? emailMatch[1].trim() : '',\n npsScore: score,\n category: score >= 9 ? 'Promoter' : (score >= 7 ? 'Passive' : 'Detractor'),\n feedback: feedbackMatch ? feedbackMatch[1].trim() : '',\n timestamp: new Date().toISOString(),\n historyId: emailData.historyId || '',\n emailSubject: snippet.substring(0, 50)\n }\n}];"
},
"typeVersion": 2
},
{
"id": "1b044a4c-93e7-490f-8c79-495c90abe4ce",
"name": "Enviar correo de encuesta NPS",
"type": "n8n-nodes-base.gmail",
"position": [
448,
-208
],
"webhookId": "1ef4b7ef-d4de-44cc-8938-37a29544cce3",
"parameters": {
"sendTo": "={{ $json.clientEmail }}",
"message": "=<html> <head> <meta charset=\"UTF-8\"> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"> <style> body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; line-height: 1.6; color: #333; margin: 0; padding: 0; background-color: #f4f4f4; } .email-container { max-width: 600px; margin: 20px auto; background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.1); } .header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 40px 30px; text-align: center; } .header h1 { margin: 0 0 10px 0; font-size: 28px; font-weight: 600; } .header p { margin: 0; font-size: 16px; opacity: 0.95; } .content { padding: 40px 30px; background: #ffffff; } .content p { font-size: 16px; margin: 0 0 20px 0; color: #555; } .question { font-size: 18px; font-weight: 600; text-align: center; margin: 30px 0 25px 0; color: #333; } .rating-container { text-align: center; margin: 30px 0; padding: 20px 0; } .rating-row { margin: 15px 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; } .rating-button { display: inline-block; width: 52px; height: 52px; margin: 4px; text-decoration: none; border-radius: 50%; font-weight: bold; font-size: 18px; line-height: 52px; color: white; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.15); } .rating-button:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(0,0,0,0.25); } .score-detractor { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%); } .score-passive { background: linear-gradient(135deg, #ffd93d 0%, #ffb830 100%); color: #333; } .score-promoter { background: linear-gradient(135deg, #6bcf7f 0%, #4caf50 100%); } .label-row { display: flex; justify-content: space-between; max-width: 500px; margin: 20px auto 0 auto; padding: 0 10px; } .label { font-size: 13px; color: #666; font-weight: 500; } .info-box { background: #f8f9fa; border-left: 4px solid #667eea; padding: 15px 20px; margin: 25px 0; border-radius: 4px; } .info-box p { margin: 8px 0; font-size: 14px; } .footer { text-align: center; padding: 30px; background: #f8f9fa; color: #999; font-size: 13px; } .footer p { margin: 5px 0; color: #999; } .highlight { color: #667eea; font-weight: 600; } @media only screen and (max-width: 600px) { .email-container { margin: 0; border-radius: 0; } .header { padding: 30px 20px; } .header h1 { font-size: 24px; } .content { padding: 30px 20px; } .rating-button { width: 44px; height: 44px; line-height: 44px; font-size: 16px; margin: 3px; } } </style> </head> <body> <div class=\"email-container\"> <div class=\"header\"> <h1>Thank You, {{ $json.clientName }}! 🎉</h1> <p>We appreciate your business with {{ $json.companyName || 'us' }}</p> </div> <div class=\"content\"> <p>Hi <strong>{{ $json.clientName }}</strong>,</p> <p>Thank you for choosing our services! We're grateful for the opportunity to work with you on your recent project valued at <span class=\"highlight\">${{ $json.dealValue }}</span>.</p> <div class=\"info-box\"> <p>💡 <strong>Your feedback matters!</strong> It takes just 5 seconds and helps us improve our service for everyone.</p> </div> <p class=\"question\">How likely are you to recommend us to a friend or colleague?</p> <div class=\"rating-container\"> <div class=\"rating-row\"> <a href=\"mailto:{{ $env.SENDER_EMAIL }}?subject=NPS%20Response%20-%20Score%200&body=Deal%20ID%3A%20{{ $json.dealId }}%0AClient%3A%20{{ $json.clientName }}%0AEmail%3A%20{{ $json.clientEmail }}%0AScore%3A%200%0A%0APlease%20share%20your%20feedback%3A%0A\" class=\"rating-button score-detractor\">0</a> <a href=\"mailto:{{ $env.SENDER_EMAIL }}?subject=NPS%20Response%20-%20Score%201&body=Deal%20ID%3A%20{{ $json.dealId }}%0AClient%3A%20{{ $json.clientName }}%0AEmail%3A%20{{ $json.clientEmail }}%0AScore%3A%201%0A%0APlease%20share%20your%20feedback%3A%0A\" class=\"rating-button score-detractor\">1</a> <a href=\"mailto:{{ $env.SENDER_EMAIL }}?subject=NPS%20Response%20-%20Score%202&body=Deal%20ID%3A%20{{ $json.dealId }}%0AClient%3A%20{{ $json.clientName }}%0AEmail%3A%20{{ $json.clientEmail }}%0AScore%3A%202%0A%0APlease%20share%20your%20feedback%3A%0A\" class=\"rating-button score-detractor\">2</a> <a href=\"mailto:{{ $env.SENDER_EMAIL }}?subject=NPS%20Response%20-%20Score%203&body=Deal%20ID%3A%20{{ $json.dealId }}%0AClient%3A%20{{ $json.clientName }}%0AEmail%3A%20{{ $json.clientEmail }}%0AScore%3A%203%0A%0APlease%20share%20your%20feedback%3A%0A\" class=\"rating-button score-detractor\">3</a> <a href=\"mailto:{{ $env.SENDER_EMAIL }}?subject=NPS%20Response%20-%20Score%204&body=Deal%20ID%3A%20{{ $json.dealId }}%0AClient%3A%20{{ $json.clientName }}%0AEmail%3A%20{{ $json.clientEmail }}%0AScore%3A%204%0A%0APlease%20share%20your%20feedback%3A%0A\" class=\"rating-button score-detractor\">4</a> <a href=\"mailto:{{ $env.SENDER_EMAIL }}?subject=NPS%20Response%20-%20Score%205&body=Deal%20ID%3A%20{{ $json.dealId }}%0AClient%3A%20{{ $json.clientName }}%0AEmail%3A%20{{ $json.clientEmail }}%0AScore%3A%205%0A%0APlease%20share%20your%20feedback%3A%0A\" class=\"rating-button score-detractor\">5</a> <a href=\"mailto:{{ $env.SENDER_EMAIL }}?subject=NPS%20Response%20-%20Score%206&body=Deal%20ID%3A%20{{ $json.dealId }}%0AClient%3A%20{{ $json.clientName }}%0AEmail%3A%20{{ $json.clientEmail }}%0AScore%3A%206%0A%0APlease%20share%20your%20feedback%3A%0A\" class=\"rating-button score-detractor\">6</a> </div> <div class=\"rating-row\"> <a href=\"mailto:{{ $env.SENDER_EMAIL }}?subject=NPS%20Response%20-%20Score%207&body=Deal%20ID%3A%20{{ $json.dealId }}%0AClient%3A%20{{ $json.clientName }}%0AEmail%3A%20{{ $json.clientEmail }}%0AScore%3A%207%0A%0APlease%20share%20your%20feedback%3A%0A\" class=\"rating-button score-passive\">7</a> </div> <div class=\"rating-row\"> <a href=\"mailto:{{ $env.SENDER_EMAIL }}?subject=NPS%20Response%20-%20Score%208&body=Deal%20ID%3A%20{{ $json.dealId }}%0AClient%3A%20{{ $json.clientName }}%0AEmail%3A%20{{ $json.clientEmail }}%0AScore%3A%208%0A%0APlease%20share%20your%20thoughts%3A%0A\" class=\"rating-button score-promoter\">8</a> <a href=\"mailto:{{ $env.SENDER_EMAIL }}?subject=NPS%20Response%20-%20Score%209&body=Deal%20ID%3A%20{{ $json.dealId }}%0AClient%3A%20{{ $json.clientName }}%0AEmail%3A%20{{ $json.clientEmail }}%0AScore%3A%209%0A%0APlease%20share%20your%20thoughts%3A%0A\" class=\"rating-button score-promoter\">9</a> <a href=\"mailto:{{ $env.SENDER_EMAIL }}?subject=NPS%20Response%20-%20Score%2010&body=Deal%20ID%3A%20{{ $json.dealId }}%0AClient%3A%20{{ $json.clientName }}%0AEmail%3A%20{{ $json.clientEmail }}%0AScore%3A%2010%0A%0APlease%20share%20your%20thoughts%3A%0A\" class=\"rating-button score-promoter\">10</a> </div> <div class=\"label-row\"> <span class=\"label\">Not Likely</span> <span class=\"label\">Very Likely</span> </div> </div> <p style=\"text-align: center; font-size: 14px; color: #888; margin-top: 30px;\"> Simply click your rating above - your email client will open with a pre-filled message. Add any additional comments and hit send! </p> </div> <div class=\"footer\"> <p><strong>Your feedback helps us serve you better</strong></p> <p>If you have any immediate concerns, feel free to reply directly to this email.</p> <p style=\"margin-top: 15px; color: #bbb;\">© 2025 Your Company. All rights reserved.</p> </div> </div> </body> </html>",
"options": {},
"subject": "We'd love your feedback! 🌟"
},
"credentials": {
"gmailOAuth2": {
"id": "gEIaWCTvGfYjMSb3",
"name": "Gmail credentials"
}
},
"typeVersion": 2.1
},
{
"id": "23960d58-04aa-4f68-9e6a-f868cb539322",
"name": "Actualizar GHL - Marcar encuesta enviada",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
672,
-208
],
"parameters": {
"url": "=https://services.leadconnectorhq.com/opportunities/{{ $('Check if Valid Deals Exist').item.json.dealId }}",
"method": "PUT",
"options": {},
"jsonBody": "={\n \"customFields\": [\n {\n \"id\": \"nps_survey_sent\",\n \"value\": true\n },\n {\n \"id\": \"nps_sent_date\",\n \"value\": \"{{ $now.toISO() }}\"\n }\n ]\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "={{ $env.GHL_API_TOKEN }}"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Accept",
"value": "application/json"
}
]
}
},
"typeVersion": 4.1
},
{
"id": "9e7dfb92-e4b4-4cc4-bc26-f1d8ccecf709",
"name": "Enrutar por puntuación (Promotor vs Detractor)",
"type": "n8n-nodes-base.if",
"position": [
-64,
144
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "352d5f37-53af-4d13-8495-ba5f5074e866",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $json.npsScore }}",
"rightValue": 7
}
]
}
},
"typeVersion": 2.2
},
{
"id": "a651447f-dd47-493f-9ccd-5be62e2bde20",
"name": "Crear ticket de soporte en Notion",
"type": "n8n-nodes-base.notion",
"position": [
208,
256
],
"parameters": {
"title": "=🚨 Support Needed - {{ $json.clientName }}",
"options": {},
"resource": "databasePage",
"databaseId": {
"__rl": true,
"mode": "list",
"value": "27fd8188-083a-8049-9459-d1fb575a2bc6",
"cachedResultUrl": "https://www.notion.so/27fd8188083a80499459d1fb575a2bc6",
"cachedResultName": "NPS Score client "
},
"propertiesUi": {
"propertyValues": [
{
"key": "Name|title",
"title": "={{ $json.clientName }}"
},
{
"key": "Email|rich_text",
"textContent": "={{ $json.clientEmail }}"
},
{
"key": "Category|rich_text",
"textContent": "={{ $json.category }}"
},
{
"key": "NPS Score|number",
"numberValue": "={{ $json.npsScore }}"
},
{
"key": "Subject|rich_text",
"textContent": "={{ $json.emailSubject }}"
}
]
}
},
"credentials": {
"notionApi": {
"id": "E9jA8DFWT2IxdpMU",
"name": "Notion account Vivek"
}
},
"typeVersion": 2
},
{
"id": "9c9aee11-4754-4cd3-8b2a-be8de417681c",
"name": "Registrar comentario positivo en Notion",
"type": "n8n-nodes-base.notion",
"position": [
208,
32
],
"parameters": {
"title": "=⭐ Positive Review - {{ $json.clientName }}",
"options": {},
"resource": "databasePage",
"databaseId": {
"__rl": true,
"mode": "list",
"value": "27fd8188-083a-8049-9459-d1fb575a2bc6",
"cachedResultUrl": "https://www.notion.so/27fd8188083a80499459d1fb575a2bc6",
"cachedResultName": "NPS Score client "
},
"propertiesUi": {
"propertyValues": [
{
"key": "Name|title",
"title": "={{ $json.clientName }}"
},
{
"key": "Email|rich_text",
"textContent": "={{ $json.clientEmail }}"
},
{
"key": "Category|rich_text",
"textContent": "={{ $json.category }}"
},
{
"key": "NPS Score|number",
"numberValue": "={{ $json.npsScore }}"
},
{
"key": "Subject|rich_text",
"textContent": "={{ $json.emailSubject }}"
}
]
}
},
"credentials": {
"notionApi": {
"id": "E9jA8DFWT2IxdpMU",
"name": "Notion account Vivek"
}
},
"typeVersion": 2
},
{
"id": "ac681e09-12fe-41bc-992b-322efa5eede4",
"name": "Enviar agradecimiento y solicitud de reseña",
"type": "n8n-nodes-base.gmail",
"position": [
432,
32
],
"webhookId": "e3b7576c-98fa-486c-bb67-630ffe2e26e6",
"parameters": {
"sendTo": "={{ $json.clientEmail }}",
"message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>We Value Your Feedback</title>\n</head>\n<body style=\"margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f4f4f4;\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #f4f4f4; padding: 40px 20px;\">\n <tr>\n <td align=\"center\">\n <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #ffffff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);\">\n <tr>\n <td style=\"background: linear-gradient(135deg, #28a745 0%, #218838 100%); padding: 40px 30px; border-radius: 8px 8px 0 0; text-align: center;\">\n <h1 style=\"color: #ffffff; margin: 0; font-size: 28px; font-weight: 600;\">\n We're Glad You Had a Great Experience!\n </h1>\n </td>\n </tr>\n <tr>\n <td style=\"padding: 40px 30px;\">\n <p style=\"color: #333333; font-size: 16px; line-height: 1.6; margin: 0 0 20px;\">\n Dear <strong>{{ $json.clientName }}</strong>,\n </p>\n <p style=\"color: #333333; font-size: 16px; line-height: 1.6; margin: 0 0 20px;\">\n Thank you for taking the time to share your experience with us. We're delighted to see your positive feedback and truly appreciate your support.\n </p>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin: 30px 0;\">\n <tr>\n <td style=\"background-color: #d4edda; border-left: 4px solid #28a745; padding: 20px; border-radius: 4px;\">\n <p style=\"color: #155724; font-size: 14px; margin: 0 0 10px; font-weight: 600;\">YOUR FEEDBACK SCORE</p>\n <p style=\"color: #333333; font-size: 32px; font-weight: bold; margin: 0; line-height: 1;\">{{ $json.npsScore }}/10</p>\n <p style=\"color: #155724; font-size: 14px; margin: 10px 0 0; font-style: italic;\">Category: {{ $json.category }}</p>\n </td>\n </tr>\n </table>\n <p style=\"color: #333333; font-size: 16px; line-height: 1.6; margin: 0 0 20px;\">\n We're thrilled to know you had a good experience. Feedback like yours motivates us to keep improving.\n </p>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin: 30px 0;\">\n <tr>\n <td align=\"center\">\n <a href=\"[YOUR_REVIEW_LINK]\" style=\"display: inline-block; background-color: #28a745; color: #ffffff; text-decoration: none; padding: 15px 40px; border-radius: 5px; font-size: 16px; font-weight: 600;\">Share Your Review</a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n</body>\n</html>",
"options": {},
"subject": "=🌟 Thank you! Share your experience with others"
},
"credentials": {
"gmailOAuth2": {
"id": "gEIaWCTvGfYjMSb3",
"name": "Gmail credentials"
}
},
"typeVersion": 2.1
},
{
"id": "dc7d124a-a9e9-43cb-a747-e4d91ae111a6",
"name": "Alertar al equipo - Puntuación baja",
"type": "n8n-nodes-base.gmail",
"position": [
432,
256
],
"webhookId": "e3b7576c-98fa-486c-bb67-630ffe2e26e6",
"parameters": {
"sendTo": "={{ $env.SUPPORT_TEAM_EMAIL }}",
"message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0;\">\n <title>Low NPS Alert</title>\n</head>\n<body style=\"margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f4f4f4;\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #f4f4f4; padding: 40px 20px;\">\n <tr>\n <td align=\"center\">\n <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #ffffff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);\">\n <tr>\n <td style=\"background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); padding: 40px 30px; border-radius: 8px 8px 0 0; text-align: center;\">\n <h1 style=\"color: #ffffff; margin: 0; font-size: 28px; font-weight: 600;\">🚨 Urgent: Low NPS Score Received</h1>\n </td>\n </tr>\n <tr>\n <td style=\"padding: 40px 30px;\">\n <p style=\"color: #333333; font-size: 16px; line-height: 1.6; margin: 0 0 20px;\">\n <strong>Action Required:</strong> A client has submitted a low NPS score indicating dissatisfaction.\n </p>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin: 20px 0; background-color: #f8d7da; border-left: 4px solid #dc3545; padding: 20px; border-radius: 4px;\">\n <tr>\n <td>\n <p style=\"margin: 5px 0;\"><strong>Client:</strong> {{ $json.clientName }}</p>\n <p style=\"margin: 5px 0;\"><strong>Email:</strong> {{ $json.clientEmail }}</p>\n <p style=\"margin: 5px 0;\"><strong>NPS Score:</strong> {{ $json.npsScore }}/10</p>\n <p style=\"margin: 5px 0;\"><strong>Category:</strong> {{ $json.category }}</p>\n <p style=\"margin: 5px 0;\"><strong>Deal ID:</strong> {{ $json.dealId }}</p>\n </td>\n </tr>\n </table>\n <p style=\"color: #333333; font-size: 16px; line-height: 1.6; margin: 20px 0;\">\n <strong>Feedback:</strong><br>{{ $json.feedback || 'No additional feedback provided' }}\n </p>\n <p style=\"color: #dc3545; font-size: 16px; font-weight: 600; margin: 20px 0;\">\n ⏰ Please reach out within 24 hours to address their concerns.\n </p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n</body>\n</html>",
"options": {},
"subject": "=🚨 Low NPS Alert - {{ $json.clientName }} (Score: {{ $json.npsScore }})"
},
"credentials": {
"gmailOAuth2": {
"id": "gEIaWCTvGfYjMSb3",
"name": "Gmail credentials"
}
},
"typeVersion": 2.1
},
{
"id": "a5d77a43-4cbe-4385-b3fe-fb727242b591",
"name": "Obtener respuestas NPS no leídas",
"type": "n8n-nodes-base.gmail",
"position": [
-480,
160
],
"webhookId": "4b06d341-892d-4439-b24d-63361bd517bc",
"parameters": {
"filters": {
"readStatus": "unread"
},
"resource": "thread"
},
"credentials": {
"gmailOAuth2": {
"id": "gEIaWCTvGfYjMSb3",
"name": "Gmail credentials"
}
},
"typeVersion": 2.1
},
{
"id": "2e2533c7-a882-48e2-8730-5662ed4fe972",
"name": "Activador: Verificar respuestas semanalmente",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-752,
160
],
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtDay": [
1
],
"triggerAtHour": 8
}
]
}
},
"typeVersion": 1.1
},
{
"id": "64c7ec78-08eb-477a-bcff-4592d0ed20e7",
"name": "Nota adhesiva6",
"type": "n8n-nodes-base.stickyNote",
"position": [
304,
-464
],
"parameters": {
"height": 208,
"content": "## ✅ Check for Valid Deals\n\nIF condition to confirm whether valid deals exist.\nIf none are found, the workflow stops here."
},
"typeVersion": 1
},
{
"id": "2032d832-e055-4279-ac57-01ca277617d1",
"name": "Nota adhesiva7",
"type": "n8n-nodes-base.stickyNote",
"position": [
592,
-464
],
"parameters": {
"height": 224,
"content": "## 📧 Send NPS Survey Email\n\nSends a personalized HTML email with rating scale (0–10).\nIncludes mailto links for quick responses and client-specific info."
},
"typeVersion": 1
},
{
"id": "e3a332cb-3e87-4e78-85e9-7c1826be396b",
"name": "Nota adhesiva8",
"type": "n8n-nodes-base.stickyNote",
"position": [
928,
-336
],
"parameters": {
"height": 272,
"content": "## 📤 Update GHL - Mark Survey Sent\n\nUpdates custom fields in GHL:\n\nnps_survey_sent = true\n\nnps_sent_date = current timestamp\n\nPrevents duplicate surveys being sent."
},
"typeVersion": 1
},
{
"id": "0003c5d1-d6a9-4a17-ba17-899ba70ace5d",
"name": "Nota adhesiva9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
400
],
"parameters": {
"height": 208,
"content": "## 📬 Fetch Unread NPS Responses\n\nChecks unread Gmail threads for new NPS responses.\nTriggered weekly to process accumulated replies."
},
"typeVersion": 1
},
{
"id": "dda3e7ef-c046-422c-ad6c-59ace9defff1",
"name": "Nota adhesiva10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-288,
320
],
"parameters": {
"height": 368,
"content": "## 🔎 Parse NPS Score from Email\n\nExtracts from response email:\n\nNPS score (0–10)\n\nClient name & email\n\nDeal ID & subject line\n\nWritten feedback\n\nAutomatically classifies into Promoter, Passive, or Detractor."
},
"typeVersion": 1
},
{
"id": "fe709bf9-2770-4ac6-8869-ef82614b528e",
"name": "Nota adhesiva11",
"type": "n8n-nodes-base.stickyNote",
"position": [
608,
0
],
"parameters": {
"height": 224,
"content": "## ⭐ Positive Feedback\n\nLogs promoter response in Notion as a positive entry.\nSends thank-you + review request email to encourage public sharing."
},
"typeVersion": 1
},
{
"id": "3508d7f5-2f0a-403b-8b38-d59de6a0a107",
"name": "Nota adhesiva12",
"type": "n8n-nodes-base.stickyNote",
"position": [
544,
336
],
"parameters": {
"height": 352,
"content": "## 🚨 Handle Low Scores (Detractors)\n\nFor detractor responses:\n\nCreates a support ticket in Notion\n\nSends urgent alert email to support team\n\nEnsures dissatisfied clients get immediate attention."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "2786a3a2-86a4-41df-9919-90482ca3229c",
"connections": {
"1b044a4c-93e7-490f-8c79-495c90abe4ce": {
"main": [
[
{
"node": "23960d58-04aa-4f68-9e6a-f868cb539322",
"type": "main",
"index": 0
}
]
]
},
"97d39aee-3ed7-483d-98b2-fc145ca2fd7e": {
"main": [
[
{
"node": "02919d71-92cf-40f1-9ab7-357cd411e8f4",
"type": "main",
"index": 0
}
]
]
},
"8306f5d0-8a9b-405d-ac4b-55d1397c6f8c": {
"main": [
[
{
"node": "1b044a4c-93e7-490f-8c79-495c90abe4ce",
"type": "main",
"index": 0
}
]
]
},
"a5d77a43-4cbe-4385-b3fe-fb727242b591": {
"main": [
[
{
"node": "10f2bf7b-6360-477d-b3fa-0d4a0f6ea275",
"type": "main",
"index": 0
}
]
]
},
"10f2bf7b-6360-477d-b3fa-0d4a0f6ea275": {
"main": [
[
{
"node": "9e7dfb92-e4b4-4cc4-bc26-f1d8ccecf709",
"type": "main",
"index": 0
}
]
]
},
"02919d71-92cf-40f1-9ab7-357cd411e8f4": {
"main": [
[
{
"node": "90f67410-7777-4a7f-a764-7bffc0b83da1",
"type": "main",
"index": 0
}
]
]
},
"a651447f-dd47-493f-9ccd-5be62e2bde20": {
"main": [
[
{
"node": "dc7d124a-a9e9-43cb-a747-e4d91ae111a6",
"type": "main",
"index": 0
}
]
]
},
"9c9aee11-4754-4cd3-8b2a-be8de417681c": {
"main": [
[
{
"node": "ac681e09-12fe-41bc-992b-322efa5eede4",
"type": "main",
"index": 0
}
]
]
},
"2e2533c7-a882-48e2-8730-5662ed4fe972": {
"main": [
[
{
"node": "a5d77a43-4cbe-4385-b3fe-fb727242b591",
"type": "main",
"index": 0
}
]
]
},
"90f67410-7777-4a7f-a764-7bffc0b83da1": {
"main": [
[
{
"node": "8306f5d0-8a9b-405d-ac4b-55d1397c6f8c",
"type": "main",
"index": 0
}
]
]
},
"9e7dfb92-e4b4-4cc4-bc26-f1d8ccecf709": {
"main": [
[
{
"node": "9c9aee11-4754-4cd3-8b2a-be8de417681c",
"type": "main",
"index": 0
}
],
[
{
"node": "a651447f-dd47-493f-9ccd-5be62e2bde20",
"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 - Creación de contenido, 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
Rahul Joshi
@rahul08Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.
Compartir este flujo de trabajo