跟踪销售代表绩效
高级
这是一个CRM, AI Summarization领域的自动化工作流,包含 16 个节点。主要使用 Set, Code, GoogleSheets, McpClientTool, ManualTrigger 等节点。 使用 AI 洞察和 Google Sheets 跟踪分析销售绩效
前置要求
- •Google Sheets API 凭证
- •OpenAI API Key
使用的节点 (16)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "bB57PHGi6PT6kDou",
"meta": {
"instanceId": "c38e3b8a7e4240e6cdca062743f016c1029f385bf40345b6291939dfd83bfd77",
"templateCredsSetupCompleted": true
},
"name": "32 跟踪销售代表绩效",
"tags": [],
"nodes": [
{
"id": "3a81bea5-aad7-43af-a555-e7be29f9f59a",
"name": "⚡ 开始抓取(手动触发器)",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-500,
-80
],
"parameters": {},
"typeVersion": 1
},
{
"id": "81b6c9eb-17b7-45b0-abf8-4cdf31bf3b50",
"name": "🔗 设置 MCP 源 URL",
"type": "n8n-nodes-base.set",
"position": [
-280,
-80
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "5357cffe-b338-4852-a0ca-b9d9cf0700a1",
"name": "activityURL",
"type": "string",
"value": "https://jsonplaceholder.typicode.com/todos"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "f9d0f0d5-1dd7-4d85-b55c-3e84cfbf6918",
"name": "🤖 分析销售代表绩效",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
0,
-80
],
"parameters": {
"text": "=You are a web scraper and data analyzer connected to Bright Data’s MCP tool.\n\nScrape the following URL:\n{{ $json.activityURL }}\n\nEach item in the data represents a sales rep activity. The \"userId\" is the rep ID, \"title\" is the task name, and \"completed\" is task status.\n\nStep 1: Group tasks by each userId (rep).\nStep 2: For each rep, calculate:\n\ntotalTasks\n\ncompletedTasks\n\nincompleteTasks\n\ncompletionRate (as percentage)\nStep 3: Rank reps from highest to lowest completion rate.\nStep 4: Add a field coachingRecommended: true if completionRate is less than 70%, false otherwise.",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "947d6147-93ed-49be-91ad-6f9970be50e7",
"name": "🧠 AI 大脑 (OpenAI)",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-80,
180
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "kmqnyfHdWfA8k1KC",
"name": "OpenAi account 3"
}
},
"typeVersion": 1.2
},
{
"id": "d5b17f70-e99e-4424-a047-9fafb86aa8dc",
"name": "🌐 Bright Data MCP 工具",
"type": "n8n-nodes-mcp.mcpClientTool",
"position": [
80,
160
],
"parameters": {
"toolName": "scrape_as_markdown",
"operation": "executeTool",
"toolParameters": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tool_Parameters', ``, 'json') }}"
},
"credentials": {
"mcpClientApi": {
"id": "dGu6Ys11ijXSTxcV",
"name": "MCP Client (STDIO) account"
}
},
"typeVersion": 1
},
{
"id": "b3e71d48-9247-431f-a384-8b087f25157e",
"name": "🧩 将 JSON 拆分为单独记录",
"type": "n8n-nodes-base.code",
"position": [
460,
-80
],
"parameters": {
"jsCode": "return items[0].json.output.map(rep => {\nreturn {\njson: {\nrepId: rep.repId,\ntotalTasks: rep.totalTasks,\ncompletedTasks: rep.completedTasks,\nincompleteTasks: rep.incompleteTasks,\ncompletionRate: rep.completionRate,\ncoachingRecommended: rep.coachingRecommended\n}\n};\n});"
},
"typeVersion": 2
},
{
"id": "a4b9a8a4-bca2-46d9-ab45-fee4e9cf49de",
"name": "📊 存储代表绩效 (Google Sheets)",
"type": "n8n-nodes-base.googleSheets",
"position": [
640,
-80
],
"parameters": {
"columns": {
"value": {
"repId": "={{ $json.repId }}",
"totalTasks": "={{ $json.totalTasks }}",
"completedTasks": "={{ $json.completedTasks }}",
"completionRate": "={{ $json.completionRate }}",
"incompletedTasks": "={{ $json.incompleteTasks }}",
"coachingRecomended": "={{ $json.coachingRecommended }}"
},
"schema": [
{
"id": "repId",
"type": "string",
"display": true,
"required": false,
"displayName": "repId",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "totalTasks",
"type": "string",
"display": true,
"required": false,
"displayName": "totalTasks",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "completedTasks",
"type": "string",
"display": true,
"required": false,
"displayName": "completedTasks",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "incompletedTasks",
"type": "string",
"display": true,
"required": false,
"displayName": "incompletedTasks",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "completionRate",
"type": "string",
"display": true,
"required": false,
"displayName": "completionRate",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "coachingRecomended",
"type": "string",
"display": true,
"required": false,
"displayName": "coachingRecomended",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ybPVtArYMojjWfT5EJyiC8I666ZhfQAWAeQ0A8Qidjg/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ybPVtArYMojjWfT5EJyiC8I666ZhfQAWAeQ0A8Qidjg",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ybPVtArYMojjWfT5EJyiC8I666ZhfQAWAeQ0A8Qidjg/edit?usp=drivesdk",
"cachedResultName": "Track Sales Rep Performance"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "i899RBJ6SKiYYWwx",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "2db26570-4de1-498b-ad8d-e49833ca8b48",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
-780
],
"parameters": {
"color": 7,
"width": 440,
"height": 900,
"content": "## 🔹 第一部分:输入与触发器"
},
"typeVersion": 1
},
{
"id": "ca28cb46-e2fd-46b9-b1b7-057bf4a20d24",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
-1220
],
"parameters": {
"color": 6,
"width": 440,
"height": 1340,
"content": "## 🤖 第二部分:AI 抓取器与分析器 (Bright Data MCP + AI Agent)"
},
"typeVersion": 1
},
{
"id": "a63a1c64-7df3-41a4-9b1b-ece10b73ef60",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
-880
],
"parameters": {
"color": 5,
"width": 420,
"height": 1000,
"content": "## 📊 第三部分:处理并存储到 Google Sheets"
},
"typeVersion": 1
},
{
"id": "35bc1f15-dfa8-4435-a233-319da5da91a1",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2120,
-980
],
"parameters": {
"color": 4,
"width": 1300,
"height": 2920,
"content": "# 🚀 销售代表绩效抓取器与分析器 (n8n + Bright Data + AI)"
},
"typeVersion": 1
},
{
"id": "4e4b4be2-e443-40c4-b6a9-df32564c0843",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
860,
-880
],
"parameters": {
"color": 7,
"width": 380,
"height": 240,
"content": "## 如果您通过此链接加入 Bright Data,我将获得少量佣金 — 感谢您为更多免费内容提供支持!"
},
"typeVersion": 1
},
{
"id": "5ec158a5-1136-4047-9b42-0aa9d0816a0c",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2120,
-1340
],
"parameters": {
"color": 4,
"width": 1300,
"height": 320,
"content": "======================================="
},
"typeVersion": 1
},
{
"id": "87667602-c4a6-44ae-8b02-a552e85de303",
"name": "自动修复输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
"position": [
200,
180
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "3e504880-d09a-44b5-9774-f89c1b7d85ad",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
160,
400
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "kmqnyfHdWfA8k1KC",
"name": "OpenAi account 3"
}
},
"typeVersion": 1.2
},
{
"id": "ffc087e9-4d4a-4881-b731-6f0ecdbfc1d3",
"name": "🧾 结构化响应解析器1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
340,
400
],
"parameters": {
"jsonSchemaExample": "[\n {\n \"repId\": 5,\n \"totalTasks\": 20,\n \"completedTasks\": 13,\n \"incompleteTasks\": 7,\n \"completionRate\": 65,\n \"coachingRecommended\": true\n },\n {\n \"repId\": 1,\n \"totalTasks\": 20,\n \"completedTasks\": 11,\n \"incompleteTasks\": 9,\n \"completionRate\": 55,\n \"coachingRecommended\": true\n },\n {\n \"repId\": 2,\n \"totalTasks\": 20,\n \"completedTasks\": 10,\n \"incompleteTasks\": 10,\n \"completionRate\": 50,\n \"coachingRecommended\": true\n },\n {\n \"repId\": 3,\n \"totalTasks\": 20,\n \"completedTasks\": 8,\n \"incompleteTasks\": 12,\n \"completionRate\": 40,\n \"coachingRecommended\": true\n },\n {\n \"repId\": 10,\n \"totalTasks\": 20,\n \"completedTasks\": 11,\n \"incompleteTasks\": 9,\n \"completionRate\": 55,\n \"coachingRecommended\": true\n },\n {\n \"repId\": 9,\n \"totalTasks\": 20,\n \"completedTasks\": 9,\n \"incompleteTasks\": 11,\n \"completionRate\": 45,\n \"coachingRecommended\": true\n },\n {\n \"repId\": 4,\n \"totalTasks\": 20,\n \"completedTasks\": 7,\n \"incompleteTasks\": 13,\n \"completionRate\": 35,\n \"coachingRecommended\": true\n },\n {\n \"repId\": 6,\n \"totalTasks\": 20,\n \"completedTasks\": 6,\n \"incompleteTasks\": 14,\n \"completionRate\": 30,\n \"coachingRecommended\": true\n },\n {\n \"repId\": 7,\n \"totalTasks\": 20,\n \"completedTasks\": 10,\n \"incompleteTasks\": 10,\n \"completionRate\": 50,\n \"coachingRecommended\": true\n },\n {\n \"repId\": 8,\n \"totalTasks\": 20,\n \"completedTasks\": 13,\n \"incompleteTasks\": 7,\n \"completionRate\": 65,\n \"coachingRecommended\": true\n }\n]\n"
},
"typeVersion": 1.3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "e13736eb-09b4-4bd7-af0b-6b00f8b008bf",
"connections": {
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Auto-fixing Output Parser",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"🧠 AI Brain (OpenAI)": {
"ai_languageModel": [
[
{
"node": "🤖 Analyze Sales Rep Performance ",
"type": "ai_languageModel",
"index": 0
}
]
]
},
" 🔗 Set MCP Source URL": {
"main": [
[
{
"node": "🤖 Analyze Sales Rep Performance ",
"type": "main",
"index": 0
}
]
]
},
"Auto-fixing Output Parser": {
"ai_outputParser": [
[
{
"node": "🤖 Analyze Sales Rep Performance ",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"🌐 Bright Data MCP Tool": {
"ai_tool": [
[
{
"node": "🤖 Analyze Sales Rep Performance ",
"type": "ai_tool",
"index": 0
}
]
]
},
"🧾 Structured Response Parser1": {
"ai_outputParser": [
[
{
"node": "Auto-fixing Output Parser",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"⚡ Start Scraping (Manual Trigger)": {
"main": [
[
{
"node": " 🔗 Set MCP Source URL",
"type": "main",
"index": 0
}
]
]
},
"🤖 Analyze Sales Rep Performance ": {
"main": [
[
{
"node": "🧩 Split JSON to Individual Records",
"type": "main",
"index": 0
}
]
]
},
"🧩 Split JSON to Individual Records": {
"main": [
[
{
"node": " 📊 Store Rep Performance (Google Sheets)",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 客户关系管理, AI 摘要总结
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
31 监控销售管道指标
Bright Data、OpenAI和Google表格的实时销售管道分析
Set
Code
Google Sheets
+7
16 节点Yaron Been
客户关系管理
分析区域绩效
使用Bright Data MCP和GPT-4o分析销售区域绩效
Set
Code
Gmail
+8
17 节点Yaron Been
客户关系管理
监控本地事件
使用 Bright Data MCP 和 OpenAI 分析自动监控本地事件
Set
Code
Google Sheets
+8
18 节点Yaron Been
市场调研
分析竞争对手反向链接
使用Bright Data MCP和GPT提取和分析竞争对手反向链接数据
Set
Code
Google Sheets
+7
16 节点Yaron Been
市场调研
35 监控竞争对手财务状况
使用Bright Data MCP、OpenAI和Google Sheets监控竞争对手财务表现
Set
Code
Gmail
+8
18 节点Yaron Been
市场调研
监控竞争对手社交媒体互动
使用Bright Data和AI监控LinkedIn竞争对手参与度与分析
Set
Code
Google Sheets
+7
19 节点Yaron Been
市场调研
工作流信息
难度等级
高级
节点数量16
分类2
节点类型10
作者
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
外部链接
在 n8n.io 查看 →
分享此工作流