Skip to main content
All CollectionsData Enrichment and APIAPI
Hubspot Data Enrichment with Lusha API
Hubspot Data Enrichment with Lusha API
Ella Madar avatar
Written by Ella Madar
Updated over a week ago

Use case:

Enrich Hubspot Contact Data with Lusha's API key based on Full Name and Domain parameters without requiring any additional applications or special JSON codes.

Requirements:

Having Lusha’s API key, a Hubspot account with the “Workflows” feature included (currently available for Marketing Hub, Sales Hub, Service Hub, and Operations Hub subscriptions) and the follow contact mandatory data points: Full name) and email domain (or Company Domain).

What is Hubspot Workflow?

HubSpot workflows are automated sequences of actions triggered by a specific set of conditions. These conditions can be based on user behavior, contact properties, or specific events. Workflows are designed to move contacts through a predefined set of actions.

How to set it up:

  1. To get started, go to your Hubspot account and select Automation > Workflows in the main menu.

  2. From the Workflow page, select “create Workflow” on the top right of the page, and then “From scratch”.

  3. Here is where you choose a trigger that aligns with the starting point of your workflow. Common triggers include form submissions, email clicks, or changes in contact properties.

💡 For this example, we are using a Contact based workflow, selecting “Blank Workflow and using the following contact trigger template:

4. With the triggers now chosen it’s time to continue building the enrichment flow. Click on the “+” > CRM > Set property value. Set Property value “Full Name” to include both “First Name” and “Last Name”. It should reflect as the following:

💡 You can skip this step if you already have the "Full Name" field.

5. Now click on “+” again and select “Custom code” - we are now using parameters to set up the API call with Lusha.

Language: Node.js 16.x

Description: POST request - Lusha API V2

Secrets: -

Property to include in code: fullName > Full Name

and companyDomain > Email Domain

Code: Please refer to the file attached*

*To avoid missing sections, copy the file in as a text edit.

*The API key must be included to the code in the part highlighted below.

6. Scroll down to the end of the custom code window and click on “Add output”. This is where you map the fields to be reflected in the response. Choose the field type (String) and type the desired response field, example: email 1; email 2; jobtitle; linkedinProfile; phone 1; phone 2; etc. It should look like this:

7. After selecting the outputs and configuring the code, it is time to run the action. Still in the custom window, scroll to the bottom to find the "Test action" area. Choose an example of a contact to be enriched (using the parameters stated at the beginning of this article).

8. With that set we are now adding the values output from the requests to the designated contact fields by adding a new step > CRM > Copy property value (this is optional to what fields need to be enriched).

Under the “Property or value to copy from” make sure you search and select the information you want for the contact object (target object field should stay as it is).

Next, confirm that the selected field matches, in this example, the Job title:

Here are some examples and its field structure (for enrich Linkedin URL / phone number / job title):

The flow is now finished. If you have any questions on the above feel free to reach out to our support team via email - support@lusha.com or using our website chat (on the bottom right side).

Did this answer your question?