销售代表绩效追踪器
高级
这是一个CRM, Multimodal AI领域的自动化工作流,包含 21 个节点。主要使用 If, Code, Slack, Notion, HighLevel 等节点。 基于HighLevel CRM、GPT-4o、Notion和Slack的自动化销售排行榜
前置要求
- •Slack Bot Token 或 Webhook URL
- •Notion API Key
- •Google Sheets API 凭证
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "10DIaOOdZ9QBUom9",
"meta": {
"instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177",
"templateCredsSetupCompleted": true
},
"name": "销售代表绩效追踪器",
"tags": [],
"nodes": [
{
"id": "e4b514d1-ceed-4308-bf24-a94abc9a01fc",
"name": "当点击\"执行工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-736,
-128
],
"parameters": {},
"typeVersion": 1
},
{
"id": "78510025-3729-4ff7-8349-a26ef82e1db1",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-544,
-688
],
"parameters": {
"height": 528,
"content": "## 📦 从HighLevel CRM获取所有交易"
},
"typeVersion": 1
},
{
"id": "b92239c9-9f54-4efc-9e9c-874bf8f66759",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-256,
32
],
"parameters": {
"height": 384,
"content": "## 🔍 验证交易获取成功(IF节点)"
},
"typeVersion": 1
},
{
"id": "5e0496ef-bb97-44fa-8df4-ed773f3e7eb9",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
64,
496
],
"parameters": {
"height": 448,
"content": "## 🚨 记录获取或验证错误(错误处理节点)"
},
"typeVersion": 1
},
{
"id": "8f2b9f85-8750-4d8b-bba2-cb240a4954fe",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1056,
400
],
"parameters": {
"height": 432,
"content": "## 🧠 GPT-4o模型配置"
},
"typeVersion": 1
},
{
"id": "db313017-c7f5-4671-b994-c56e75d006ae",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
672,
-912
],
"parameters": {
"height": 544,
"content": "## 🧾 生成Notion绩效仪表板"
},
"typeVersion": 1
},
{
"id": "08277d6f-c97f-46dd-ace1-8dc01a2ef297",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
624,
176
],
"parameters": {
"height": 416,
"content": "## ⚙️ 为AI输入转换数据"
},
"typeVersion": 1
},
{
"id": "9518f7ae-ea95-44e1-af79-291151d1124a",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
-624
],
"parameters": {
"height": 544,
"content": "## 🤖 AI生成的激励性Slack消息"
},
"typeVersion": 1
},
{
"id": "e052b33a-3d29-4eb1-aa8a-f497c121d9d1",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1472,
192
],
"parameters": {
"height": 464,
"content": "## 💬 在Slack中通知销售团队"
},
"typeVersion": 1
},
{
"id": "6956ad52-fc95-43b7-8194-fd952b56aea9",
"name": "从HighLevel CRM获取所有交易",
"type": "n8n-nodes-base.highLevel",
"position": [
-464,
-128
],
"parameters": {
"filters": {},
"resource": "opportunity",
"operation": "getAll",
"requestOptions": {}
},
"credentials": {
"highLevelOAuth2Api": {
"id": "5QWHSi134dLIBEsC",
"name": "HighLevel account"
}
},
"typeVersion": 2
},
{
"id": "bad87d8a-9bf2-4194-995f-2619a222975f",
"name": "验证交易获取成功",
"type": "n8n-nodes-base.if",
"position": [
-192,
-128
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e2adb005-2b3c-4d1e-8445-442df1fe925a",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.id }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "8c390668-b627-4943-8d4a-adc0c6f84cd9",
"name": "记录获取或验证错误",
"type": "n8n-nodes-base.googleSheets",
"position": [
128,
320
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "error_id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "error_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "error",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "error",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"error_id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1338537721,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Uldk_4BxWbdZTDZxFUeohIfeBmGHHqVEl9Ogb0l6R8Y/edit#gid=1338537721",
"cachedResultName": "error log sheet"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1Uldk_4BxWbdZTDZxFUeohIfeBmGHHqVEl9Ogb0l6R8Y",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Uldk_4BxWbdZTDZxFUeohIfeBmGHHqVEl9Ogb0l6R8Y/edit?usp=drivesdk",
"cachedResultName": "Interviewer Brief Pack "
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "kpPEOLCGn963qpoh",
"name": "automations@techdome.ai"
}
},
"typeVersion": 4.6
},
{
"id": "616feb11-a8c0-4955-9202-ed1a12e34208",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
32,
-704
],
"parameters": {
"height": 544,
"content": "## 🧹 清理和构建交易数据"
},
"typeVersion": 1
},
{
"id": "c205c167-2333-43a9-a80b-43ebd068559d",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
304,
-672
],
"parameters": {
"height": 512,
"content": "## 📊 按代表汇总销售数据"
},
"typeVersion": 1
},
{
"id": "eda6d196-9842-46f0-b077-31ab9ccd40fd",
"name": "清理和构建交易数据",
"type": "n8n-nodes-base.code",
"position": [
128,
-128
],
"parameters": {
"jsCode": "const deals = $input.all().map(i => i.json);\n\nconst cleaned = deals.map(d => ({\n deal_id: d.id,\n deal_name: d.name,\n rep_id: d.assignedTo || \"Unassigned\",\n status: d.status,\n stage_id: d.pipelineStageId,\n value: d.monetaryValue || 0,\n client_name: d.relations?.[0]?.contactName || \"Unknown\",\n company_name: d.relations?.[0]?.companyName || \"\",\n updated_at: d.updatedAt\n}));\n\nreturn cleaned.map(c => ({ json: c }));\n"
},
"typeVersion": 2
},
{
"id": "de0e86ce-8d99-40bb-8e9a-a25773785f72",
"name": "按代表汇总销售数据",
"type": "n8n-nodes-base.code",
"position": [
368,
-128
],
"parameters": {
"jsCode": "const deals = $input.all().map(i => i.json);\n\n// Object to hold totals per rep\nconst summary = {};\n\nfor (const d of deals) {\n const rep = d.rep_id || \"Unassigned\";\n if (!summary[rep]) {\n summary[rep] = {\n rep_id: rep,\n total_deals: 0,\n total_value: 0,\n won_deals: 0,\n };\n }\n\n summary[rep].total_deals += 1;\n summary[rep].total_value += d.value || 0;\n\n // If your GHL marks won deals as 'won' or similar\n if (d.status && d.status.toLowerCase().includes(\"won\")) {\n summary[rep].won_deals += 1;\n }\n}\n\n// Convert to array for output\nreturn Object.values(summary).map(rep => ({\n json: {\n rep_id: rep.rep_id,\n total_deals: rep.total_deals,\n total_value: rep.total_value,\n won_deals: rep.won_deals,\n avg_value: rep.total_value / rep.total_deals,\n },\n}));\n"
},
"typeVersion": 2
},
{
"id": "4014211b-b50d-46d2-a0dc-dba3e3bb7766",
"name": "生成Notion绩效仪表板",
"type": "n8n-nodes-base.notion",
"position": [
752,
-336
],
"parameters": {
"title": "={{ $json[\"rep_id\"] }} - Sales Rep Performance Tracker\n",
"pageId": {
"__rl": true,
"mode": "id",
"value": "265802b91fa080f69fffd0fc1daffe3d"
},
"simple": false,
"blockUi": {
"blockValues": [
{
"text": {
"text": [
{
"text": "={{ $json[\"rep_id\"] }} - Sales Rep Performance Tracker\n",
"annotationUi": {}
}
]
},
"type": "heading_1",
"richText": true
},
{
"textContent": "=👋 Hello {{$json[\"rep_id\"]}}, here’s your latest performance update! 🎉 \n\n**Sales Rep Performance Tracker** \n🔎 **Problem:** No visibility into which rep is actually performing well. \n✅ **Solution:** Track your daily performance, updated every midnight.\n\nHere’s your performance summary for today: \n- 📊 **Total Deals:** {{$json[\"total_deals\"]}} \n- 💰 **Total Value:** {{$json[\"total_value\"]}} \n- 🏆 **Deals Won:** {{$json[\"won_deals\"]}} \n- 📈 **Average Deal Value:** {{$json[\"avg_value\"]}}\n\n📅 **Next Update:** The leaderboard will be refreshed every day at midnight to show your ranking alongside your peers. \n\n**Value:** Transparent performance insights → healthy competition → better accountability. \n\nKeep up the great work and aim for the top! 🚀 \nStatus: *Ongoing* |"
}
]
},
"options": {}
},
"credentials": {
"notionApi": {
"id": "iDjtgSTYG9ECVBtT",
"name": "Notion account 2"
}
},
"typeVersion": 2.2
},
{
"id": "4c6b43f1-6397-46df-b4e2-880fb400dcb9",
"name": "为AI输入转换数据",
"type": "n8n-nodes-base.code",
"position": [
704,
0
],
"parameters": {
"jsCode": "// Collect all incoming data\nconst allData = items.map(item => item.json);\n\n// Transform and flatten the structure\nconst formattedData = allData.map(item => ({\n rep_id: item.rep_id,\n total_deals: item.total_deals,\n total_value: item.total_value,\n won_deals: item.won_deals,\n avg_value: item.avg_value\n}));\n\n// Return each record as a separate item (AI node-friendly)\nreturn formattedData.map(data => ({ json: data }));\n"
},
"typeVersion": 2
},
{
"id": "891ba41f-f222-4a41-b557-14808b3fabc4",
"name": "GPT-4o模型配置",
"type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
"position": [
1072,
224
],
"parameters": {
"model": "gpt-4o",
"options": {}
},
"credentials": {
"azureOpenAiApi": {
"id": "C3WzT18XqF8OdVM6",
"name": "Azure Open AI account"
}
},
"typeVersion": 1
},
{
"id": "e676ef5c-e9f9-4b2b-b6b7-8a52b8b91179",
"name": "AI生成的激励性Slack消息",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1088,
0
],
"parameters": {
"text": "=Generate a motivational Slack message for the following sales reps based on their performance data:\n\n{{JSON.stringify($json)}}\n\nFormat it like this:\n- Use emojis 🎯🔥💪 for motivation\n- Mention each rep_id and highlight their performance briefly\n- Keep it under 2–3 lines per rep\n",
"options": {
"systemMessage": "=You are a motivational message generator for a sales team. \nYou will receive sales rep data including total deals, total value, won deals, and average deal value.\nUse this data to create short, positive, and personalized motivational messages suitable for posting in Slack. \nKeep it friendly, energetic, and relevant to the rep’s performance.\n"
},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "45ff779d-dc4e-4a83-bcfc-5197aecdc91f",
"name": "在Slack中通知销售团队",
"type": "n8n-nodes-base.slack",
"position": [
1520,
0
],
"webhookId": "ddaa7632-9e35-4bd3-82d6-572d5cae84cc",
"parameters": {
"text": "={{ $json.output }}",
"user": {
"__rl": true,
"mode": "list",
"value": "U09HMPVD466",
"cachedResultName": "newscctv22"
},
"select": "user",
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "rNqvWj9TfChPVRYY",
"name": "Slack account vivek"
}
},
"typeVersion": 2.3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d7102749-1f49-4575-a6cc-b80eb1664bbe",
"connections": {
"GPT-4o Model Configuration": {
"ai_languageModel": [
[
{
"node": " AI-Generated Motivational Slack Messages",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Clean & Structure Deal Data": {
"main": [
[
{
"node": " Summarize Sales by Representative",
"type": "main",
"index": 0
}
]
]
},
" Transform Data for AI Input": {
"main": [
[
{
"node": " AI-Generated Motivational Slack Messages",
"type": "main",
"index": 0
}
]
]
},
" Validate Deal Fetch Success": {
"main": [
[
{
"node": "Clean & Structure Deal Data",
"type": "main",
"index": 0
}
],
[
{
"node": " Log Fetch or Validation Errors ",
"type": "main",
"index": 0
}
]
]
},
" Summarize Sales by Representative": {
"main": [
[
{
"node": "Generate Notion Performance Dashboard",
"type": "main",
"index": 0
},
{
"node": " Transform Data for AI Input",
"type": "main",
"index": 0
}
]
]
},
"Fetch All Deals from HighLevel CRM": {
"main": [
[
{
"node": " Validate Deal Fetch Success",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Fetch All Deals from HighLevel CRM",
"type": "main",
"index": 0
}
]
]
},
" AI-Generated Motivational Slack Messages": {
"main": [
[
{
"node": "Notify Sales Team in Slack",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 客户关系管理, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
服务后评价收集器
客户评价收集与情感分析:HighLevel、GPT-4o、Gmail和Slack
If
Wait
Gmail
+7
20 节点Rahul Joshi
客户关系管理
提案生成_草稿保存自动化
使用Azure GPT-4o生成商业提案并从Sheets保存为Gmail草稿
If
Code
Gmail
+6
16 节点Rahul Joshi
客户关系管理
发布说明转常见问题存根(Jira/ClickUp)
使用GPT-4o从ClickUp自动生成发布说明到Notion和Slack
If
Code
Gmail
+8
20 节点Rahul Joshi
工程
从 Stripe 支付自动交付模板给客户
使用Stripe、GPT-4o和Gmail的自动化模板交付系统
If
Code
Gmail
+12
44 节点Rahul Joshi
客户关系管理
面试质量审计
使用GPT-4o-mini和Google表格通过Slack审核面试反馈并生成报告
If
Code
Slack
+5
23 节点Rahul Joshi
内容创作
客户入职帮助请求(Typeform 到 Gmail 和 Sheets)
客户入职帮助请求(Typeform 到 Gmail 和 Sheets)
If
Code
Gmail
+10
28 节点Rahul Joshi
内容创作
工作流信息
难度等级
高级
节点数量21
分类2
节点类型10
作者
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 查看 →
分享此工作流