Salesforce与2个潜在客户丰富 - 最终版
这是一个Sales、AI领域的自动化工作流,包含 10 个节点。主要使用 Code、Merge、Filter、Salesforce、HttpRequest 等节点,结合人工智能技术实现智能自动化。 自动化AI潜在客户丰富:从Salesforce到Explorium获取增强的潜在客户数据
- •Salesforce OAuth 凭证
- •可能需要目标 API 的认证凭证
{
"id": "u92uqa8glb0TuCG9",
"meta": {
"instanceId": "0a70652f43c1b29dd16c35b61a38fd31c8004f58bc7e723bf43262a797407c77",
"templateCredsSetupCompleted": true
},
"name": "Salesforce 与 2 个潜在客户丰富 - 最终版",
"tags": [],
"nodes": [
{
"id": "70a40c85-eb5d-41b0-96ab-11ba442189c8",
"name": "Salesforce 触发器",
"type": "n8n-nodes-base.salesforceTrigger",
"position": [
-1880,
680
],
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "leadCreated"
},
"credentials": {
"salesforceOAuth2Api": {
"id": "unhmsSbB64eNwCMO",
"name": "Salesforce account"
}
},
"typeVersion": 1
},
{
"id": "b16d1538-753a-405f-884c-c05dd1076c15",
"name": "更新潜在客户",
"type": "n8n-nodes-base.salesforce",
"position": [
-340,
680
],
"parameters": {
"leadId": "={{ $('Salesforce Trigger').item.json.Id}}",
"operation": "update",
"updateFields": {
"city": "={{ $json.city || null }}",
"email": "={{ $json.professions_email || null }}",
"phone": "={{ $json.phone_numbers?.[0]?.phone_number || \"null\" }}\n",
"state": "={{ $json.region_name || '' }}",
"title": "={{ $json.experience?.[0]?.title?.name || null }}",
"company": "={{ $json.company_name || null }}",
"country": "={{ $json.country_name || null }}",
"website": "={{ $json.experience?.[0]?.company?.website || null }}",
"mobilePhone": "={{ $json.mobile_phone }}"
}
},
"credentials": {
"salesforceOAuth2Api": {
"id": "unhmsSbB64eNwCMO",
"name": "Salesforce account"
}
},
"typeVersion": 1
},
{
"id": "5417925f-919e-4c44-ba21-9249cab895eb",
"name": "匹配潜在客户",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1660,
680
],
"parameters": {
"url": "https://api.explorium.ai/v1/prospects/match",
"method": "POST",
"options": {},
"jsonBody": "={\n \"prospects_to_match\": [\n {\n \"full_name\": \"{{ $('Salesforce Trigger').item.json.FirstName }} {{ $('Salesforce Trigger').item.json.LastName }}\",\n \"company_name\": \"{{ $('Salesforce Trigger').item.json.Company }}\"\n }\n ]\n}",
"sendBody": true,
"jsonHeaders": "{\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n}",
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"specifyHeaders": "json",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "85mkGmNNdK1951hF",
"name": "Header Auth Connection"
}
},
"typeVersion": 4.2
},
{
"id": "360ca1d3-c1e6-46f4-b190-ddf76ed8847b",
"name": "从匹配结果中提取潜在客户 ID",
"type": "n8n-nodes-base.code",
"position": [
-1220,
680
],
"parameters": {
"jsCode": "const allItems = $input.all();\nconst prospectIds = allItems.map(item => \n item.json.matched_prospects.map(prospect => prospect.prospect_id)\n).flat();\n\nreturn [{\n json: {\n prospect_ids: prospectIds\n }\n}];"
},
"typeVersion": 2
},
{
"id": "aa419a45-dae1-47b0-8030-5fe0e193f804",
"name": "Explorium 丰富联系人信息",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1000,
580
],
"parameters": {
"url": "https://api.explorium.ai/v1/prospects/contacts_information/bulk_enrich",
"method": "POST",
"options": {},
"jsonBody": "={{ { \"prospect_ids\": $json.prospect_ids } }}",
"sendBody": true,
"jsonHeaders": "{\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n}",
"sendHeaders": true,
"specifyBody": "=json",
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{}
]
},
"specifyHeaders": "json",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "85mkGmNNdK1951hF",
"name": "Header Auth Connection"
}
},
"typeVersion": 4.2
},
{
"id": "91bfa198-cecf-406f-94d8-1433a75e0ada",
"name": "合并",
"type": "n8n-nodes-base.merge",
"position": [
-780,
680
],
"parameters": {
"mode": "combine",
"options": {},
"fieldsToMatchString": "data[0].prospect_id"
},
"typeVersion": 3.1
},
{
"id": "7d7866ec-8839-48c4-9dd7-239844dfb207",
"name": "过滤未匹配项",
"type": "n8n-nodes-base.filter",
"position": [
-1440,
680
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6896e951-8d66-41b1-87a5-a96d2e049675",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.matched_prospects.some(prospect => prospect.prospect_id !== null).toBoolean() }}",
"rightValue": "null"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "b67d5f83-2ba9-4c78-84ff-0a94382788f8",
"name": "代码 - 扁平化",
"type": "n8n-nodes-base.code",
"position": [
-560,
680
],
"parameters": {
"jsCode": "return $input.all().map(item => \n item.json.data.map(prospect => ({\n prospect_id: prospect.prospect_id,\n ...prospect.data\n }))\n ).flat()"
},
"typeVersion": 2
},
{
"id": "96abf132-7d7e-4e91-89da-5f0b373385a9",
"name": "Explorium 丰富资料",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1000,
780
],
"parameters": {
"url": "https://api.explorium.ai/v1/prospects/profiles/bulk_enrich",
"method": "POST",
"options": {},
"jsonBody": "={{ { \"prospect_ids\": $json.prospect_ids } }}",
"sendBody": true,
"jsonHeaders": "{\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n}",
"sendHeaders": true,
"specifyBody": "=json",
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{}
]
},
"specifyHeaders": "json",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "85mkGmNNdK1951hF",
"name": "Header Auth Connection"
}
},
"typeVersion": 4.2
},
{
"id": "6c17ea6e-165f-407a-b4c9-8731d44243f8",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2760,
480
],
"parameters": {
"width": 760,
"height": 2720,
"content": "# 使用 Explorium MCP 自动丰富 Salesforce 中的潜在客户"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {
"Salesforce Trigger": [
{
"json": {
"Id": "00QQJ00000I7no12AB",
"City": null,
"Email": "vincent.marinelli@flushingsavings.com",
"Status": "New",
"Street": null,
"Company": "flushingsavings",
"LastName": "marinelli",
"FirstName": "vincent",
"PostalCode": null,
"attributes": {
"url": "/services/data/v59.0/sobjects/Lead/00QQJ00000I7no12AB",
"type": "Lead"
}
}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "c8a79ca0-36ce-443f-b6fc-21bfa6ade38c",
"connections": {
"Merge": {
"main": [
[
{
"node": "Code - flatten",
"type": "main",
"index": 0
}
]
]
},
"Update Lead": {
"main": [
[]
]
},
"Code - flatten": {
"main": [
[
{
"node": "Update Lead",
"type": "main",
"index": 0
}
]
]
},
"Match_prospect": {
"main": [
[
{
"node": "Filter non-matched",
"type": "main",
"index": 0
}
]
]
},
"Filter non-matched": {
"main": [
[
{
"node": "Extract Prospect IDs from Matched Results",
"type": "main",
"index": 0
}
]
]
},
"Salesforce Trigger": {
"main": [
[
{
"node": "Match_prospect",
"type": "main",
"index": 0
}
]
]
},
"Explorium Enrich Profiles": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Explorium Enrich Contacts Information": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Extract Prospect IDs from Matched Results": {
"main": [
[
{
"node": "Explorium Enrich Contacts Information",
"type": "main",
"index": 0
},
{
"node": "Explorium Enrich Profiles",
"type": "main",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个中级难度的工作流,适用于Sales、AI等场景。适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
explorium
@exploriumExplorium empowers businesses to build high-performance GTM agents with specialized data infrastructure. Our seamless API integrations and high-quality data drive faster agent development and better results. With years of experience and robust data sets, we deliver context-aware solutions, helping AI agents achieve human-level support. Explorium is the essential data partner for teams building agent-driven technologies.
分享此工作流