Skip to content

HubSpot

This Integration requires Fides Cloud or Fides Enterprise. For more information, talk to our solutions team. (opens in a new tab)

HubSpot (opens in a new tab) is a customer relationship management (CRM) platform that helps customers with inbound marketing, sales, and customer service.

Prerequisites

In order to integrate with HubSpot, you'll need to collect the following information:

NameDescription
DomainYour HubSpot API URL (default:api.hubapi.com)
Private app token*Your HubSpot App's access token. Follow HubSpot docs to create a private app and retrieve the token (opens in a new tab)
Your HubSpot API Key will need access to the following scopes: settings.users.read_write, crm.objects.contacts.read_write, crm.objects.owners.read, and communication_preferences.read_write

Integrating with HubSpot

To integrate an existing system with HubSpot:

  1. Navigate to Data mapView Systems and choose the system that you want to connect.
  2. Click on the Integrations tab.
  3. Pick the vendor or system type that you want to integrate with from the Connection type drop-down menu.
  4. Complete the required fields for the integration and click Save.

You may confirm your connection is working using the Test connection button, if desired.

To learn more, please see our guide for Managing Integrations.

Consent automation

HubSpot also supports consent automation. To configure this, click on the Consent Automation accordion under the HubSpot configuration form. This section allows you to map Privacy Notices in Fides to Email Subscription Preferences in HubSpot. In the example below, setting Marketing for the Marketing information subscription will automatically subscribe and unsubscribe the user from that subscription if they opt-in or out of the Marketing privacy notice in Fides.

Consent automation mappings

Fides automatically generates a HubSpot contact for the user's email to manage their preferences, which is essential for the workflow to function correctly.

However, due to HubSpot limitations, users who had subscription preferences created before their contact was generated will need to be manually enrolled (opens in a new tab) in the workflow.

Consent webhooks

To set up the Consent Webhook, you'll need an Operations Hub Professional or Enterprise account, as these plans are required to create workflows with webhooks.

HubSpot also supports Workflow Webhooks (opens in a new tab) so we can use that functionality to post privacy preferences to Fides.

  1. Within the HubSpot dashboard, navigate to Automations > Workflows and click on Create Workflow > From Scratch.
HubSpot workflow setup
  1. Create a blank workflow: Choose the Contact-based option.
HubSpot workflow setup
  1. Set up the enrollment trigger:
    • Select When an event occurs as the trigger type.
HubSpot workflow setup
  • Add Updated email subscription status as the criteria.
HubSpot workflow setup
  • Enable Re-enrollment, then save the trigger.
HubSpot workflow setup
  1. Add a webhook action:
    • Click Add an action, then select Data Ops > Send a webhook.
HubSpot workflow setup
  • Method: POST.
  • Webhook URL:
https://your_fides_url/api/v1/plus/connection/{{connection_identifier}}/consent-webhook`.

Make sure this URL is reachable via the public internet

  • Authentication type: API Key.
  • API Key: Use the token retrieved from the consent webhook token endpoint formatted as Bearer {token}.
  • API Key name: type 'Authorization'.
  • API Key location: Request header
  • Request body should be set to Customize Request Body. Add a property with key email and value enrolled contact - Email.
HubSpot workflow setup
  • Once everything is configured, Save the action.
HubSpot workflow setup HubSpot workflow setup
  1. Click Review and publish > Skip to turn on > Turn on workflow.

By configuring this workflow webhook. Any subscribe and unsubscribe preferences that happen inside of HubSpot will be automatically forwarded and stored within Fides.

Technical detail

Fides utilizes API endpoints to access the API service for a SaaS application. An API service is the programmatic interface through which Fides can query and update data within an application to access, rectify, or delete personal information. Each SaaS tool will have a unique set of endpoints to enable privacy functions.

HubSpot Endpoints

In the table below, you can find which endpoints are used for each type of privacy function. Clicking on the endpoint will take you to the documentation for that endpoint.

Privacy functionEndpointDescription
Access RequestsContacts (opens in a new tab)Returns information about a contact in your CRM
Update or Delete RequestsContacts (opens in a new tab)Used to mask information about a contact in your CRM
Access RequestsOwners (opens in a new tab)Returns information about an owner in your account
Access RequestsSubscription preferences (opens in a new tab)Returns information about a contact's subscriptions and their statuses
Update or Delete RequestsSubscription preferences (opens in a new tab)Used to unsubscribe a contact from subscriptions
Access RequestsUsers (opens in a new tab)Returns information about a user in your account
Update or Delete RequestsUsers (opens in a new tab)Used to remove a user from your account
Consent Access RequestsSubscription preferences (opens in a new tab)Used to access a contact's subscription preferences
Consent Access RequestsSubscription preferences (opens in a new tab)Used to retrieve all subscription types
Consent Update RequestsSubscription preferences (opens in a new tab)Used to update a contact's subscription preferences