All Collections
Integrations
HubSpot
Import and update HubSpot contacts in Retently via a webhook link
Import and update HubSpot contacts in Retently via a webhook link
Alex Bitca avatar
Written by Alex Bitca
Updated over a week ago

Retently has a native integration with HubSpot that can be used to automatically sync all your contacts to Retently on a daily basis. However, due to performance concerns, the integration will not allow you to activate the automated sync for a HubSpot list if your contacts number in that list exceeds 10,000 records.

In this case, you can apply our webhook solution to make sure that your contacts are automatically imported and updated to Retently.

To briefly explain how the solution would work:

  • You will need to generate a webhook link in Retently.

  • Next, you will have to create a Workflow in HubSpot to specify what contacts are eligible to be imported to Retently.

  • Finally, you will have to add a workflow action and include the Retently's webhook link that will handle the contacts' import and update in Retently.

I will cover these steps in detail below.

Generate a webhook link in Retently

Currently, Retently webhook links can be generated only in Transactional Email campaigns, because their main purpose is to import/update a customer and trigger a survey in a transactional campaign.

Therefore, there are two things we have to do:

  1. Generate the webhook link;

  2. Make sure that the customer added via the webhook link will not receive a survey in the transactional campaign.

Start with creating a new campaign on the Campaigns page. When creating a new campaign, follow these steps:

  • Choose any metric (it really does not matter, because your contacts will not be surveyed in this campaign).

  • Choose "Email" as the channel.

  • Choose "Transactional" as the campaign type.

In your campaign builder go to the "Schedule" tab, and in the "Survey triggered via" section, select HubSpot from the dropdown menu.

Next, access the "Setup" tab in your campaign, and there you will find the Retently webhook link generated for this particular campaign. Copy and save it somewhere handy, as you will need it soon.

There are a few more quick things that you have to do to complete this step:

1. On the "Audience" tab you will have to set a rule that no contact from your HubSpot account would ever match.

For example: Email address -> contains -> testemail@thisisatestdomain.retently

This is required to make sure that contacts added via the webhook link will not match this campaign and will not receive a transactional survey.

2. Make sure to assign a survey template, because you will need to be able to activate your campaign for the webhook link to work.

3. Finally, activate your campaign by switching the toggle ON. Also, as a recommendation, you can rename the campaign to make sure that other users in your account will not deactivate or use it for surveys by mistake. A name like "DO NOT TOUCH" should work.

Note: If you want to create more transactional campaigns, you have to add the new webhooks to the HubSpot workflows as well.

Create a HubSpot Workflow

The next step is to create a Workflow in your HubSpot account, where you will specify what contacts should be sent to Retently.

Follow this tutorial to learn how to configure a new workflow (this is the official HubSpot tutorial on creating workflows):

In your HubSpot account, navigate to Automation > Workflows, and in the upper right corner, click Create workflow.

In the left panel, choose whether you want to start your workflow from scratch, or from a template.

  • Start from scratch: to begin with a blank workflow, click the Start from scratch tab. Then select Contact-based, Company-based, Deal-based, Ticket-based, or Quote-based as the workflow type. If you select Contact-based, you can choose to continue from scratch or center your workflow on a date or date property.

  • Templates: to start with a default set of enrollment triggers and actions, click the Templates tab. In the left panel, search or click the Type dropdown menu to file by template type. Select a template to preview the enrollment triggers and actions on the right.

Next, click the pencil icon edit to give your workflow a name, then click Create workflow.

Set enrollment criteria

Once your workflow has been created, set the enrollment criteria. When a contact record meets these criteria, they'll automatically be enrolled. If you only want to enroll records manually, leave the enrollment trigger box blank. Learn more about manual enrollment.

In the workflow editor, click Set enrollment triggers. Learn more about setting enrollment triggers in workflows.

In the right panel, select a filter type for your enrollment trigger. Set up the criteria, then click Apply filter.

By default, records will only enroll in a workflow the first time they meet the enrollment triggers. To enable re-enrollment:

  • In the right sidebar, click the Re-enrollment tab.

  • Click to toggle the Re-enrollment switch on.

  • Select the triggers that you want to use for re-enrollment. Learn more about adding re-enrollment triggers to workflows.

Add more enrollment triggers if needed, and when you're done, click Save.

Add the webhook action

Click the plus icon + to add a workflow action. In the right panel, select Trigger a webhook and enter the webhook URL, and hit the Save button.

Note: There is no need to tick the “Use Request Signature” checkbox, and you don’t need to enter an App ID.

Manage settings

Click the Settings tab to manage the workflow's settings. On the General page, select days and times that you want actions to execute, and associate campaigns with the workflow. On the Unenrollment and suppression page, set unenrollment and suppression criteria to automatically remove or exclude records from the workflow.

Turn on your workflow

In the upper right corner, click Review. Choose to enroll records that currently meet the criteria or only enroll records that meet the criteria in the future:

  • To only enroll records that meet the enrollment triggers after the workflow is turned on, select No, only enroll [objects] which meet the trigger criteria after turning the workflow on.

  • To enroll existing records that meet the enrollment triggers, select Yes, enroll existing [objects] which meet the trigger criteria as of now.

  • If you have a Marketing Hub Starter, Professional, or Enterprise account, in contact-based workflows you can view a static list of contacts that meet the criteria by clicking Use lists to see these contacts. The list will automatically be saved and can be accessed from your lists dashboard.

Finally, review workflow settings, then click Turn on. In the dialog box, click Yes, turn on.

After you turn your workflow on, you can view the workflow history to monitor the records that are enrolled.

From now on, every time a contact will match your HubSpot workflow, the data will be passed through the Retently webhook link and the contact will be created (or updated) in Retently.

Did this answer your question?