使用 Google Forms、Sheets 和 GoHighLevel CRM 自动处理潜在客户录入与去重
高级
这是一个Lead Generation领域的自动化工作流,包含 18 个节点。主要使用 If, Code, Filter, HttpRequest, GoogleSheets 等节点。 使用 Google Forms、Sheets 和 GoHighLevel CRM 自动处理潜在客户录入与去重
前置要求
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "f1e3a076-6607-4018-9bcc-ef0008d7156d",
"name": "Google Sheets Trigger1",
"type": "n8n-nodes-base.googleSheetsTrigger",
"notes": "Monitors Google Forms responses sheet for new submissions every minute. Triggers when new lead data is added.",
"position": [
-976,
256
],
"parameters": {
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/1NxuC7u6ycvn18f-vyUjvIiYmQ_DJiH7q6YwLndIlLi8/edit?resourcekey=&gid=2142376877#gid=2142376877"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/1NxuC7u6ycvn18f-vyUjvIiYmQ_DJiH7q6YwLndIlLi8/edit?resourcekey=&gid=2142376877#gid=2142376877"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"id": "tjY8nawuuRO1rxAE",
"name": "Google Sheets Trigger account"
}
},
"description": "Triggers the workflow when a new lead submits the Google Form",
"typeVersion": 1
},
{
"id": "6a0428e1-327b-403f-9319-5cb078a1758c",
"name": "查找潜在客户1",
"type": "n8n-nodes-base.googleSheets",
"notes": "Searches the leads database spreadsheet to check if an email already exists. This helps identify duplicate leads.",
"position": [
-752,
256
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QMm8xd7-xK-0rwfx9-98hWoKBiNsXljwah4F9qSao1s/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1QMm8xd7-xK-0rwfx9-98hWoKBiNsXljwah4F9qSao1s",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QMm8xd7-xK-0rwfx9-98hWoKBiNsXljwah4F9qSao1s/edit?usp=drivesdk",
"cachedResultName": "Lead Database"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "s4dP1fNuVZ2gWvs3",
"name": "Google Sheets account"
}
},
"description": "Checks if the lead's email already exists in the database to prevent duplicates",
"typeVersion": 3
},
{
"id": "c7af40f1-cb01-43d5-ab50-b3874c427e4d",
"name": "更新联系人 (GHL)1",
"type": "n8n-nodes-base.httpRequest",
"notes": "Updates existing contact in GoHighLevel with latest information from the form submission. Uses contact ID from the lookup result.",
"position": [
-304,
352
],
"parameters": {
"url": "=https://rest.gohighlevel.com/v1/contacts?email={{ $json[\"Email address\"] }}\n",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"goHighLevelApi": {
"id": "7QfYKr1ndNWKTj36",
"name": "GoHighLevel API"
},
"httpHeaderAuth": {
"id": "7QfYKr1ndNWKTj36",
"name": "Header Auth account"
}
},
"description": "Updates existing duplicate contact in GoHighLevel CRM with new information",
"typeVersion": 4.2
},
{
"id": "3125090e-0913-454a-83e6-3a2ee0288797",
"name": "记录新潜在客户1",
"type": "n8n-nodes-base.googleSheets",
"notes": "Records the new lead information in the leads database spreadsheet along with the GoHighLevel contact ID for future reference.",
"position": [
144,
160
],
"parameters": {
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QMm8xd7-xK-0rwfx9-98hWoKBiNsXljwah4F9qSao1s/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1QMm8xd7-xK-0rwfx9-98hWoKBiNsXljwah4F9qSao1s",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1QMm8xd7-xK-0rwfx9-98hWoKBiNsXljwah4F9qSao1s/edit?usp=drivesdk",
"cachedResultName": "Lead Database"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "s4dP1fNuVZ2gWvs3",
"name": "Google Sheets account"
}
},
"description": "Adds new lead to the database spreadsheet with GHL contact ID for tracking",
"typeVersion": 3
},
{
"id": "061dc960-0221-4318-a2a8-47422224e7e5",
"name": "记录重复潜在客户1",
"type": "n8n-nodes-base.googleSheets",
"notes": "Updates the existing lead record in the database with new submission timestamp and increments the update counter.",
"position": [
144,
352
],
"parameters": {
"options": {},
"dataMode": "autoMapInputData",
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZbE_X3ctoS5HRUNGO5vn3Srj2ahG_Tt3uArQttk91hU/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ZbE_X3ctoS5HRUNGO5vn3Srj2ahG_Tt3uArQttk91hU",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZbE_X3ctoS5HRUNGO5vn3Srj2ahG_Tt3uArQttk91hU/edit?usp=drivesdk",
"cachedResultName": "Leads duplicate"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "s4dP1fNuVZ2gWvs3",
"name": "Google Sheets account"
}
},
"description": "Updates existing lead record in database to track duplicate submissions",
"typeVersion": 3
},
{
"id": "c05d19ef-4172-4476-a5d7-0fd9eaa6f347",
"name": "创建联系人 (GHL)1",
"type": "n8n-nodes-base.httpRequest",
"notes": "Creates a new contact in GoHighLevel CRM with all the form data. Includes custom fields and tags for better organization.",
"position": [
-80,
160
],
"parameters": {
"url": "https://rest.gohighlevel.com/v1/contacts/",
"options": {},
"jsonBody": "={\n \"firstName\": \"{{ $('Google Sheets Trigger1').item.json['First Name'] }}\",\n \"lastName\": \"{{ $('Google Sheets Trigger1').item.json['Last Name'] }}\",\n \"email\": \"{{ $('Google Sheets Trigger1').item.json.Email }}\",\n \"phone\": \"{{ $('Google Sheets Trigger1').item.json.Phone }}\",\n \"source\": \"{{ $('Google Sheets Trigger1').item.json.Source || 'Google Form' }}\",\n \"customFields\": {\n \"lead_score\": \"{{ $('Google Sheets Trigger1').item.json['Lead Score'] || 'Cold' }}\",\n \"form_submission_date\": \"{{ $now }}\"\n },\n \"tags\": [\"New Lead\", \"Google Form\"]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "goHighLevelApi"
},
"credentials": {
"goHighLevelApi": {
"id": "7QfYKr1ndNWKTj36",
"name": "GoHighLevel API"
}
},
"description": "Creates new contact in GoHighLevel CRM with form submission data",
"typeVersion": 4.2
},
{
"id": "545f1688-1b7f-41f8-9b32-efbabcfcca98",
"name": "检查重复项",
"type": "n8n-nodes-base.filter",
"position": [
-304,
160
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "374d6f04-de54-439a-b49e-4b7df42a390e",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json[\"Email address\"] }}",
"rightValue": "={{ $('Lookup Lead1').item.json[\"Email address\"] }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "bb3ef342-9acc-40cb-a1aa-b56a846f6e01",
"name": "从数据库检查?1",
"type": "n8n-nodes-base.if",
"notes": "Decision point: If lookup found an email (duplicate), go to 'true' path. If no email found (new lead), go to 'false' path.",
"position": [
-528,
256
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "41cc0f5c-5131-49c7-bd6c-1514c5b23a20",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $('Google Sheets Trigger1').item.json['Email address'] }}",
"rightValue": "={{ $json[\"Email address\"] }}"
}
]
}
},
"description": "Routes the workflow based on whether the lead is new or a duplicate",
"typeVersion": 2
},
{
"id": "b92e1f44-4326-421e-b25f-52862e616945",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1152,
-144
],
"parameters": {
"height": 384,
"content": "## 节点1:Google Sheets Trigger1"
},
"typeVersion": 1
},
{
"id": "26d72008-7869-486c-8c49-8c1e90fb54a0",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-832,
-160
],
"parameters": {
"height": 400,
"content": "## 节点2:查找潜在客户1"
},
"typeVersion": 1
},
{
"id": "39c14e1e-8ef1-4c3e-98ff-495428e90e46",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-640,
416
],
"parameters": {
"height": 400,
"content": "## 节点3:从数据库检查?1"
},
"typeVersion": 1
},
{
"id": "45de1ad7-accb-41d3-a9bc-85e6ab60d377",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-432,
-192
],
"parameters": {
"height": 336,
"content": "## 节点4:检查重复项"
},
"typeVersion": 1
},
{
"id": "d51e3ad8-642f-4ee7-a5ee-b5983ea962db",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-112,
-208
],
"parameters": {
"height": 352,
"content": "## 节点5:创建联系人 (GHL)1"
},
"typeVersion": 1
},
{
"id": "b00943a6-0039-404a-8643-4b55d0ca4fe3",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
272,
-160
],
"parameters": {
"height": 352,
"content": "## 节点6:记录新潜在客户1"
},
"typeVersion": 1
},
{
"id": "0f6fdc51-5af2-4bae-81b9-7896b96b232a",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
496
],
"parameters": {
"height": 352,
"content": "## 节点7:更新联系人 (GHL)1"
},
"typeVersion": 1
},
{
"id": "62b84233-71da-4b5d-b468-b86e334e9b57",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-32,
496
],
"parameters": {
"height": 336,
"content": "## 节点8:代码"
},
"typeVersion": 1
},
{
"id": "e6395ad9-7865-4eb9-8f05-5139f122180c",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
336,
384
],
"parameters": {
"height": 352,
"content": "## 节点9:记录重复潜在客户1"
},
"typeVersion": 1
},
{
"id": "aed3b9c1-5603-4037-adb8-8e0d4cb22f02",
"name": "字段提取",
"type": "n8n-nodes-base.code",
"position": [
-80,
352
],
"parameters": {
"jsCode": "// Grab contacts from the previous node\nconst contacts = items[0].json.contacts || [];\n\n// Set your target email (hardcode for testing, or read dynamically)\nconst targetEmail = $json.email || \"huw@talentism.com\";\n\nif (!targetEmail) {\n return [{ json: { error: \"No targetEmail provided\" } }];\n}\n\n// Filter only those contacts that actually have an email\nconst match = contacts.filter(c => \n c.email && c.email.toLowerCase() === targetEmail.toLowerCase()\n);\n\n// Return results or a clear message if not found\nif (match.length === 0) {\n return [{ json: { message: \"No contact found for \" + targetEmail } }];\n}\n\nreturn match.map(c => ({ json: c }));\n"
},
"typeVersion": 2
}
],
"pinData": {},
"connections": {
"Lookup Lead1": {
"main": [
[
{
"node": "Check from the data base?1",
"type": "main",
"index": 0
}
]
]
},
"Field extraction": {
"main": [
[
{
"node": "Log Duplicate Lead1",
"type": "main",
"index": 0
}
]
]
},
"Check the duplication": {
"main": [
[
{
"node": "Create Contact (GHL)1",
"type": "main",
"index": 0
}
]
]
},
"Create Contact (GHL)1": {
"main": [
[
{
"node": "Log New Lead1",
"type": "main",
"index": 0
}
]
]
},
"Update Contact (GHL)1": {
"main": [
[
{
"node": "Field extraction",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets Trigger1": {
"main": [
[
{
"node": "Lookup Lead1",
"type": "main",
"index": 0
}
]
]
},
"Check from the data base?1": {
"main": [
[
{
"node": "Check the duplication",
"type": "main",
"index": 0
}
],
[
{
"node": "Update Contact (GHL)1",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 潜在客户开发
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
潜在客户接收与去重工作流
使用 Google Sheets 去重潜在客户数据:自动邮件提醒与日志管理
If
Code
Filter
+4
18 节点Rahul Joshi
客户关系管理
从 Stripe 支付自动交付模板给客户
使用Stripe、GPT-4o和Gmail的自动化模板交付系统
If
Code
Gmail
+12
44 节点Rahul Joshi
客户关系管理
AI YouTube 评论分析器
使用 GPT-4o 进行 YouTube 评论分析并通过 Gmail 发送自动邮件报告
If
Set
Code
+9
18 节点Rahul Joshi
人工智能
自动化从GoHighLevel到Slack、Sheets和Calendar的高价值潜在客户提醒
将GoHighLevel的高价值潜在客户提醒自动发送至Slack、Sheets和Calendar
If
Code
Slack
+5
17 节点Rahul Joshi
潜在客户开发
潜在客户资料丰富
自动化潜在客户情报:使用Clearbit丰富Google表格并同步到Notion和ClickUp
If
Merge
Notion
+6
22 节点Rahul Joshi
潜在客户开发
ClickUp中的任务分配与所有权
使用GPT-4 Mini的线索资质判定与自动分配:从Google Sheets到ClickUp
If
Code
Cron
+5
17 节点Rahul Joshi
潜在客户开发
工作流信息
难度等级
高级
节点数量18
分类1
节点类型7
作者
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 查看 →
分享此工作流