构建潜在客户列表
中级
这是一个Lead Generation领域的自动化工作流,包含 13 个节点。主要使用 If、Code、Wait、Gmail、Filter 等节点。 构建目标潜在客户列表:使用Surfe到HubSpot查找并丰富线索
前置要求
- •Google 账号和 Gmail API 凭证
- •HubSpot API Key
- •可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "mtCQYada6O64BILe",
"meta": {
"instanceId": "1c6299b01fe56ad80280bbb1a8394f761ca72a9606abe611a4617f9adc407187"
},
"name": "构建潜在客户列表",
"tags": [],
"nodes": [
{
"id": "2299f88a-bfeb-4d28-8164-704a40c9cdae",
"name": "搜索 ICP 公司",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1560,
125
],
"parameters": {
"url": "https://api.surfe.com/v2/companies/search",
"method": "POST",
"options": {
"redirect": {
"redirect": {}
}
},
"jsonBody": "{\n \"filters\": {\n \"industries\": [\"Software\", \"Apps\", \"SaaS\"],\n \"employeeCount\": {\n \"from\": 1,\n \"to\": 35\n },\n \"countries\": [\"FR\"],\n \"revenues\": [\"1-10M\"]\n },\n \"limit\": 20\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"typeVersion": 4.2
},
{
"id": "5b7477c1-1a29-42ff-bd2c-207edeb49839",
"name": "在公司中搜索人员",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1120,
125
],
"parameters": {
"url": "https://api.surfe.com/v2/people/search",
"method": "POST",
"options": {
"redirect": {
"redirect": {}
}
},
"jsonBody": "={{ $json }}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"typeVersion": 4.2
},
{
"id": "de26445a-750e-4b12-83f7-4a864e146b8e",
"name": "准备 JSON 负载丰富请求",
"type": "n8n-nodes-base.code",
"position": [
-900,
125
],
"parameters": {
"jsCode": "const people = $json.people || [];\n\nreturn [\n {\n json: {\n \"include\": {\n \"email\": true,\n \"linkedInUrl\": false,\n \"mobile\": true\n },\n \"notificationOptions\": {\n \"webhookUrl\": \"\"\n },\n people: people.map((person) => ({\n firstName: person.firstName || \"\",\n lastName: person.lastName || \"\",\n companyName: person.companyName || \"\",\n companyDomain: person.companyDomain || \"\",\n linkedinUrl: person.linkedInUrl || \"\",\n externalID: `${person.firstName}_${person.lastName}_${person.companyDomain}`.toLowerCase().replace(/[^a-z0-9_]/g, '_')\n }))\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "a4e45b9e-327b-4ca2-9338-c2739ef93841",
"name": "Surfe 批量丰富 API",
"type": "n8n-nodes-base.httpRequest",
"position": [
-680,
125
],
"parameters": {
"url": "https://api.surfe.com/v2/people/enrich",
"method": "POST",
"options": {
"redirect": {
"redirect": {}
}
},
"jsonBody": "={{ $json }}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"typeVersion": 4.2
},
{
"id": "8ec1dbe8-b0c3-413b-9576-74cabfbaed70",
"name": "Surfe 检查丰富状态",
"type": "n8n-nodes-base.httpRequest",
"position": [
-460,
125
],
"parameters": {
"url": "=https://api.surfe.com/v2/people/enrich/{{ $json.enrichmentID }}",
"options": {
"redirect": {
"redirect": {}
}
},
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"typeVersion": 4.2
},
{
"id": "b9bba6b6-6d14-400a-bba0-64a06f4ce343",
"name": "丰富是否完成?",
"type": "n8n-nodes-base.if",
"position": [
-240,
50
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "65a670df-84e8-4c87-956c-96758b8d8d26",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "COMPLETED"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d6a21f33-d87d-4d9f-8d1d-597a943a0391",
"name": "等待 3 秒",
"type": "n8n-nodes-base.wait",
"position": [
-20,
225
],
"webhookId": "faddf14b-4e33-4108-a141-c1a172e0a5d1",
"parameters": {
"amount": 3
},
"typeVersion": 1.1
},
{
"id": "1f811e79-79b2-46b6-8bac-0e94eb63c2d8",
"name": "从 Surfe API 响应中提取人员列表",
"type": "n8n-nodes-base.code",
"position": [
-20,
0
],
"parameters": {
"jsCode": "const people = $json.people || [];\n\nreturn people.map(person => {\n return {\n json: {\n id: person.id || '',\n firstName: person.firstName || '',\n lastName: person.lastName || '',\n email: person.emails?.[0]?.email || '',\n phone: person.mobilePhones?.[0]?.mobilePhone || '',\n jobTitle: person.jobTitle || '',\n companyName: person.companyName || '',\n companyWebsite: person.companyDomain || '',\n linkedinUrl: person.linkedInUrl || '',\n country: person.country || '',\n status: person.status || ''\n }\n };\n});"
},
"typeVersion": 2
},
{
"id": "043348d5-0bb7-40d6-be4d-ad3c2a7658de",
"name": "过滤器: 电话 AND 邮箱",
"type": "n8n-nodes-base.filter",
"position": [
200,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4f8f9bec-6eee-4e62-8d5f-e8f5b85620d6",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.phone }}",
"rightValue": ""
},
{
"id": "007f5a66-4e2a-42bc-bbed-0fb2b2f39ae7",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.email }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "814c954b-749c-4b9a-93ca-70cdf9a48505",
"name": "HubSpot: 创建或更新",
"type": "n8n-nodes-base.hubspot",
"position": [
420,
0
],
"parameters": {
"email": "={{ $json.email }}",
"options": {
"resolveData": false
},
"authentication": "appToken",
"additionalFields": {
"country": "={{ $json.country }}",
"jobTitle": "={{ $json.jobTitle }}",
"lastName": "={{ $json.lastName }}",
"firstName": "={{ $json.firstName }}",
"websiteUrl": "={{ $json.linkedinUrl }}",
"companyName": "={{ $json.companyName }}",
"phoneNumber": "={{ $json.phone }}"
}
},
"typeVersion": 2.1
},
{
"id": "25faa3d0-e800-4a68-a7da-b4295f9b03ae",
"name": "Gmail",
"type": "n8n-nodes-base.gmail",
"notes": "Notify end of enrichement",
"position": [
640,
0
],
"webhookId": "b46c028e-8212-40fe-b4d5-0f7c1890585e",
"parameters": {
"sendTo": "<YOUR_EMAIL>",
"message": "Your ICP prospecting enrichment is done.",
"options": {},
"subject": "Your ICP prospecting enrichment is done."
},
"executeOnce": true,
"notesInFlow": true,
"typeVersion": 2.1
},
{
"id": "e6daaf79-f53c-4059-80f7-8bfd2df14ebf",
"name": "当点击\"执行工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1780,
125
],
"parameters": {},
"typeVersion": 1
},
{
"id": "b07b72bb-f631-4e60-9ad8-6cba88df6604",
"name": "准备包含公司域的 JSON 负载",
"type": "n8n-nodes-base.code",
"position": [
-1340,
125
],
"parameters": {
"jsCode": "const companies = $json.companyDomains || [];\n\nreturn {\n \"companies\": {\n \"domains\": companies\n },\n \"limit\": 20\n };\n\n"
},
"typeVersion": 2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "9df5b0c2-a0af-4178-85ce-94fd0b835535",
"connections": {
"Wait 3 secondes": {
"main": [
[
{
"node": "Surfe check enrichement status",
"type": "main",
"index": 0
}
]
]
},
"Search ICP Companies": {
"main": [
[
{
"node": "prepare JSON PAYLOAD WITH Company Domains",
"type": "main",
"index": 0
}
]
]
},
"Filter: phone AND email": {
"main": [
[
{
"node": "HubSpot: Create or Update",
"type": "main",
"index": 0
}
]
]
},
"Is enrichment complete ?": {
"main": [
[
{
"node": "Extract list of peoples from Surfe API response",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait 3 secondes",
"type": "main",
"index": 0
}
]
]
},
"HubSpot: Create or Update": {
"main": [
[
{
"node": "Gmail",
"type": "main",
"index": 0
}
]
]
},
"Search People in Companies": {
"main": [
[
{
"node": "Prepare JSON Payload Enrichment Request",
"type": "main",
"index": 0
}
]
]
},
"Surfe Bulk Enrichments API": {
"main": [
[
{
"node": "Surfe check enrichement status",
"type": "main",
"index": 0
}
]
]
},
"Surfe check enrichement status": {
"main": [
[
{
"node": "Is enrichment complete ?",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Search ICP Companies",
"type": "main",
"index": 0
}
]
]
},
"Prepare JSON Payload Enrichment Request": {
"main": [
[
{
"node": "Surfe Bulk Enrichments API",
"type": "main",
"index": 0
}
]
]
},
"prepare JSON PAYLOAD WITH Company Domains": {
"main": [
[
{
"node": "Search People in Companies",
"type": "main",
"index": 0
}
]
]
},
"Extract list of peoples from Surfe API response": {
"main": [
[
{
"node": "Filter: phone AND email",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个中级难度的工作流,适用于Lead Generation等场景。适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
N8N工作流:丰富购买群体
使用Surfe和Google表格自动发现和丰富HubSpot购买群体
If
Code
Wait
+8
22 节点go-surfe
Lead Generation
从 Google 表格丰富营销线索
🚀 使用Surfe、Google Sheets和HubSpot自动化LinkedIn联系人信息丰富
If
Code
Wait
+7
12 节点go-surfe
Lead Generation
潜在客户开发与邮件工作流
使用Google Maps、SendGrid和AI自动化B2B潜在客户开发与邮件营销
If
Set
Code
+21
141 节点Ezema Kingsley Chibuzo
Lead Generation
使用AI(GPT-4o)自动化数字产品和SaaS销售
使用AI(GPT-4o)自动化数字产品和SaaS销售
If
Code
Wait
+14
34 节点Badr
Sales
AI个性化多产品邮件营销
基于SMTP轮换的AI个性化多产品邮件营销(GPT-4o/o3-mini)
If
Code
Wait
+16
41 节点Badr
Sales
域名外联:自动化潜在客户提取和定向触达
域名外联:自动化潜在客户提取和定向触达
If
Code
Wait
+11
31 节点Badr
Sales
工作流信息
难度等级
中级
节点数量13
分类1
节点类型8
作者
go-surfe
@go-surfeSave time and sell more with Surfe's API via n8n workflows. - Accurate data you can trust - Results in milliseconds - Scalable and versatile - Full automation For more check out: 💻 https://www.surfe.com?utm_source=n8n 🔗 https://www.linkedin.com/company/surfe/ 👾 https://github.com/surfe/api-examples
外部链接
在 n8n.io 上查看 →
分享此工作流