8
n8n 中文网amn8n.com

使用ExactBuyer通过联系人和公司数据丰富新Hubspot联系人

中级

这是一个Sales, Marketing领域的自动化工作流,包含 12 个节点。主要使用 If, Set, Hubspot, HttpRequest, HubspotTrigger 等节点。 使用ExactBuyer通过联系人和公司数据丰富新Hubspot联系人

前置要求
  • HubSpot API Key
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "nodes": [
    {
      "id": "79c06432-9d3f-4a93-b613-24bdaedfb71d",
      "name": "找不到用户",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1940,
        640
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "07d23ef6-8c93-40de-9e95-ea3d56811fa0",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        200
      ],
      "parameters": {
        "width": 330.0463186838765,
        "height": 609.3353028064989,
        "content": "## 当在 HubSpot 中创建用户时"
      },
      "typeVersion": 1
    },
    {
      "id": "bad1ea1c-9b03-4419-ac37-272b5740a7c4",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1660,
        200
      ],
      "parameters": {
        "color": 3,
        "width": 343.28654189681333,
        "height": 609.3353028064989,
        "content": "## 使用 ExactBuyer 的数据丰富信息"
      },
      "typeVersion": 1
    },
    {
      "id": "d24ae8e3-c5fe-4cde-bade-66f60cda943d",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        240
      ],
      "parameters": {
        "color": 6,
        "width": 352.21705571104906,
        "height": 499.9091886469748,
        "content": "## 在 Hubspot 中获取用户"
      },
      "typeVersion": 1
    },
    {
      "id": "5e0775c9-178a-460e-a478-b9a69aaf80cd",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -320
      ],
      "parameters": {
        "color": 4,
        "width": 629.6175493462406,
        "height": 473.03355645575084,
        "content": "# 使用来自 ExactBuyer 的联系人和公司数据丰富新的 Hubspot 联系人"
      },
      "typeVersion": 1
    },
    {
      "id": "73f7c19a-8145-4ad3-bbf0-0a4a0d70be33",
      "name": "从 ExactBuyer 丰富用户信息",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "position": [
        1740,
        480
      ],
      "parameters": {
        "url": "https://api.exactbuyer.com/v1/enrich",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "email",
              "value": "={{ $json.email }}"
            },
            {
              "name": "required",
              "value": "work_email,personal_email,email"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "kyMNOdXZX3ugPihF",
          "name": "ExactBuyer Api key"
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "7a0c2b14-0f22-475f-84c2-49ff1c1a1fad",
      "name": "设置密钥",
      "type": "n8n-nodes-base.set",
      "position": [
        1320,
        500
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "211cd22a-a55c-4018-8ba6-3272097d502c",
              "name": "user_id",
              "type": "string",
              "value": "={{ $json.vid }}"
            },
            {
              "id": "f3c7d0b9-717c-437b-ab45-1f35c194d412",
              "name": "email",
              "type": "string",
              "value": "={{ $json.properties.email?.value }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "4da6204d-2717-41fb-8f79-3bb094db9e71",
      "name": "如果找到电子邮件",
      "type": "n8n-nodes-base.if",
      "position": [
        1480,
        500
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "dbd1042e-dfe7-40ff-84ca-c3d289decb78",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.email }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "24ef009a-c05c-4ca3-afd5-ef44b2349cfb",
      "name": "从 Hubspot 更新联系人",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        2200,
        460
      ],
      "parameters": {
        "email": "={{ $('Set keys').item.json.email }}",
        "options": {},
        "authentication": "oAuth2",
        "additionalFields": {
          "gender": "={{ $json.result.gender }}",
          "school": "={{ $json.result.education?.[0]?.school?.name }}",
          "country": "={{ $json.result.location?.country }}",
          "jobTitle": "={{ $json.result.employment?.job?.title }}",
          "lastName": "={{ $json.result.last_name }}",
          "firstName": "={{ $json.result.first_name }}",
          "companyName": "={{ $json.result.employment?.name }}",
          "companySize": "={{ $json.result.employment.size }}",
          "phoneNumber": "={{ $json.result.phone_numbers?.[0]?.E164 }}"
        }
      },
      "credentials": {
        "hubspotOAuth2Api": {
          "id": "Gxwfj6z9NwaEC3P5",
          "name": "HubSpot account 3"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "1adda76c-39cb-43e7-a1dd-301dfd530c77",
      "name": "获取 HubSpot 联系人",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1060,
        500
      ],
      "parameters": {
        "contactId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.contactId }}"
        },
        "operation": "get",
        "authentication": "oAuth2",
        "additionalFields": {}
      },
      "credentials": {
        "hubspotOAuth2Api": {
          "id": "Gxwfj6z9NwaEC3P5",
          "name": "HubSpot account 3"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "7aa3b2bc-f564-4160-adb6-e0d977993540",
      "name": "联系人创建时",
      "type": "n8n-nodes-base.hubspotTrigger",
      "position": [
        740,
        500
      ],
      "webhookId": "0c93331f-6d07-4cfe-b9b7-8a724c6c8c28",
      "parameters": {
        "eventsUi": {
          "eventValues": [
            {}
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "hubspotDeveloperApi": {
          "id": "5VJ26ST8DdVyAfEZ",
          "name": "HubSpot Developer account 3"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e8b386bf-0a86-44a0-82e6-1189bc3c5619",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2120,
        260
      ],
      "parameters": {
        "color": 6,
        "width": 352.21705571104906,
        "height": 499.9091886469748,
        "content": "## 在 Hubspot 中更新用户"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {
    "On contact created": [
      {
        "appId": 2930857,
        "eventId": 812433913,
        "portalId": 25023349,
        "sourceId": "2931120",
        "contactId": 251,
        "changeFlag": "CREATED",
        "occurredAt": 1708530793161,
        "changeSource": "INTEGRATION",
        "attemptNumber": 0,
        "subscriptionId": 2538662,
        "subscriptionType": "contact.creation"
      }
    ]
  },
  "connections": {
    "Set keys": {
      "main": [
        [
          {
            "node": "if found email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "if found email": {
      "main": [
        [
          {
            "node": "Enrich user from ExactBuyer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On contact created": {
      "main": [
        [
          {
            "node": "Get HubSpot contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get HubSpot contact": {
      "main": [
        [
          {
            "node": "Set keys",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich user from ExactBuyer": {
      "main": [
        [
          {
            "node": "Update contact from Hubspot",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Could not find user",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 销售, 营销

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量12
分类2
节点类型7
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
外部链接
在 n8n.io 查看

分享此工作流