使用 GoHighLevel、Gmail 和 Notion 自动化 NPS 调查收集与响应处理
高级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 27 个节点。主要使用 If, Code, Gmail, Notion, HighLevel 等节点。 使用GoHighLevel、Gmail和Notion自动化NPS调查收集与响应处理
前置要求
- •Google 账号和 Gmail API 凭证
- •Notion API Key
- •可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "6l4TRFLY8lVlID78",
"meta": {
"instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177",
"templateCredsSetupCompleted": true
},
"name": "使用 GoHighLevel、Gmail 和 Notion 自动化 NPS 调查收集与响应处理",
"tags": [],
"nodes": [
{
"id": "98ddd287-3cf1-4455-b0b7-359d6dd0c408",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1200,
-512
],
"parameters": {
"color": 5,
"width": 389,
"height": 656,
"content": "## 📋 NPS 调查自动化工作流"
},
"typeVersion": 1
},
{
"id": "5612db2f-264b-4b9e-b193-f045eb140c40",
"name": "便签 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-704,
-512
],
"parameters": {
"width": 300,
"height": 320,
"content": "## 🔍 获取已赢得机会"
},
"typeVersion": 1
},
{
"id": "6a69ad15-0e00-4ea9-9bed-f84133477e5a",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
-448
],
"parameters": {
"width": 280,
"height": 256,
"content": "## ✅ 筛选和验证交易"
},
"typeVersion": 1
},
{
"id": "a76c0b72-99be-4acc-a5b6-6abd68e51cf4",
"name": "便签 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
-528
],
"parameters": {
"width": 280,
"height": 308,
"content": "## 📧 发送 NPS 调查"
},
"typeVersion": 1
},
{
"id": "35b277ef-863e-4642-a183-9ff78db51609",
"name": "便签 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-928,
384
],
"parameters": {
"width": 300,
"height": 312,
"content": "## 📥 收集响应"
},
"typeVersion": 1
},
{
"id": "3f201e66-dc0b-48ce-84d0-444315c29bfd",
"name": "便签 5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
320
],
"parameters": {
"width": 320,
"height": 316,
"content": "## 🎯 根据分数路由"
},
"typeVersion": 1
},
{
"id": "02919d71-92cf-40f1-9ab7-357cd411e8f4",
"name": "从 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": "触发器:每小时检查",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-496,
-176
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "90f67410-7777-4a7f-a764-7bffc0b83da1",
"name": "筛选未调查的已完成交易",
"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": "检查是否存在有效交易",
"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": "从邮件解析 NPS 分数",
"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": "发送 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": "更新 GHL - 标记调查已发送",
"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": "按分数路由(推荐者 vs 贬损者)",
"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": "在 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": "在 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": "发送感谢和评价请求",
"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": "提醒团队 - 低分",
"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": "获取未读 NPS 响应",
"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": "触发器:每周检查响应",
"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": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
304,
-464
],
"parameters": {
"height": 208,
"content": "## ✅ 检查有效交易"
},
"typeVersion": 1
},
{
"id": "2032d832-e055-4279-ac57-01ca277617d1",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
592,
-464
],
"parameters": {
"height": 224,
"content": "## 📧 发送 NPS 调查邮件"
},
"typeVersion": 1
},
{
"id": "e3a332cb-3e87-4e78-85e9-7c1826be396b",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
928,
-336
],
"parameters": {
"height": 272,
"content": "## 📤 更新 GHL - 标记调查已发送"
},
"typeVersion": 1
},
{
"id": "0003c5d1-d6a9-4a17-ba17-899ba70ace5d",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
400
],
"parameters": {
"height": 208,
"content": "## 📬 获取未读 NPS 响应"
},
"typeVersion": 1
},
{
"id": "dda3e7ef-c046-422c-ad6c-59ace9defff1",
"name": "便签 10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-288,
320
],
"parameters": {
"height": 368,
"content": "## 🔎 从邮件解析 NPS 分数"
},
"typeVersion": 1
},
{
"id": "fe709bf9-2770-4ac6-8869-ef82614b528e",
"name": "便签11",
"type": "n8n-nodes-base.stickyNote",
"position": [
608,
0
],
"parameters": {
"height": 224,
"content": "## ⭐ 正面反馈"
},
"typeVersion": 1
},
{
"id": "3508d7f5-2f0a-403b-8b38-d59de6a0a107",
"name": "便签 12",
"type": "n8n-nodes-base.stickyNote",
"position": [
544,
336
],
"parameters": {
"height": 352,
"content": "## 🚨 处理低分(贬损者)"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "2786a3a2-86a4-41df-9919-90482ca3229c",
"connections": {
"Send NPS Survey Email": {
"main": [
[
{
"node": "Update GHL - Mark Survey Sent",
"type": "main",
"index": 0
}
]
]
},
"Trigger: Check Every Hour": {
"main": [
[
{
"node": "Get Won Opportunities from GHL",
"type": "main",
"index": 0
}
]
]
},
"Check if Valid Deals Exist": {
"main": [
[
{
"node": "Send NPS Survey Email",
"type": "main",
"index": 0
}
]
]
},
"Fetch Unread NPS Responses": {
"main": [
[
{
"node": "Parse NPS Score from Email",
"type": "main",
"index": 0
}
]
]
},
"Parse NPS Score from Email": {
"main": [
[
{
"node": "Route by Score (Promoter vs Detractor)",
"type": "main",
"index": 0
}
]
]
},
"Get Won Opportunities from GHL": {
"main": [
[
{
"node": "Filter Unsurveyed Completed Deals",
"type": "main",
"index": 0
}
]
]
},
"Create Support Ticket in Notion": {
"main": [
[
{
"node": "Alert Team - Low Score",
"type": "main",
"index": 0
}
]
]
},
"Log Positive Feedback in Notion": {
"main": [
[
{
"node": "Send Thank You & Review Request",
"type": "main",
"index": 0
}
]
]
},
"Trigger: Check Responses Weekly": {
"main": [
[
{
"node": "Fetch Unread NPS Responses",
"type": "main",
"index": 0
}
]
]
},
"Filter Unsurveyed Completed Deals": {
"main": [
[
{
"node": "Check if Valid Deals Exist",
"type": "main",
"index": 0
}
]
]
},
"Route by Score (Promoter vs Detractor)": {
"main": [
[
{
"node": "Log Positive Feedback in Notion",
"type": "main",
"index": 0
}
],
[
{
"node": "Create Support Ticket in Notion",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
GoHighLevel管道速度跟踪器和自动化停滞交易提醒
使用GoHighLevel、Gmail和Slack分析管道速度并提醒停滞交易
If
Code
Gmail
+5
25 节点Rahul Joshi
内容创作
使用GoHighLevel、Gmail、Slack和Sheets的每周客户互动自动化
每周客户再互动系统(GoHighLevel、Gmail、Sheets和Slack)
If
Code
Gmail
+7
23 节点Rahul Joshi
内容创作
使用 Google Drive、Gmail 和 Slack 的 GoHighLevel 客户入职流程
使用Google Drive、Gmail、Calendar和Slack自动化GoHighLevel客户入职
If
Code
Gmail
+6
23 节点Rahul Joshi
内容创作
Airtable订单到Stripe发票(B2B/手动收款)
从Airtable订单创建Stripe发票,并使用Google表格记录
If
Code
Stripe
+5
19 节点Rahul Joshi
内容创作
退款同步 + 客户通知
Stripe争议管理,集成Google Sheets分类账和Gmail通知
If
Code
Gmail
+4
15 节点Rahul Joshi
内容创作
从 Stripe 支付自动交付模板给客户
使用Stripe、GPT-4o和Gmail的自动化模板交付系统
If
Code
Gmail
+12
44 节点Rahul Joshi
客户关系管理
工作流信息
难度等级
高级
节点数量27
分类2
节点类型8
作者
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.
外部链接
在 n8n.io 查看 →
分享此工作流