Skip to content

Users from Hubspot

Providing users their data from a CRM contacts, together with ability to update them, is probably the most common self-service use-case to implement in a portal. With Ainua Portal this is very straight-forward operation although some complexity variations may exist depending on the back-office solution.

In this how-to case we introduce the integration from a very common Hubspot, using Power Automate as the integration solution.

Hubspot integration using Power Automate

The following workflow is implemented using Power Automate. It covers detecting addition and changes of contacts in Hubspot.

The workflow utilizes Hubspot webhook capability to immediately notify of the changes in Hubspot end whether that is a creation of a new contact, changes in an existing contact or deletion of an existing contact.

Hubspot contact card changes

In this case we wanted to add extra bit of control over who will be provided access to their data via the companys customer portal. Therefore a new custom property Has Portal Access was added to a contact object in Hubspot.

Hubspot integration using Power Automate

Please refer to Hubspot documentation on how to do this (admin permissions are required).

Hubspot Private App

The way to integrate (at least in the time of writing this how to) Hubspot using Power Automate, is to configure a Private App in Hubspot. Follow Hubspot documentation on how to configure the Private App for your Hubspot instance.

The notifications on the desired changes is achieved by configuring a webhook callback in Power Automate and define event subscriptions in Hubspot to call it when any of those events take place. Configure following event subscriptions for the newly created Private App:

  • contact.propertyChange
    • hasportal changed
    • firstname changed
    • lastname changed
    • jobtitle changed
    • email changed
    • phone changed
    • address changed
    • zip changed
    • city changed
    • country changed
  • contact.deletion
    • deleted

Ainua Portal configuration

Connector for Hubspot

To be able to update data to your Ainua Portal instance, a connector in Ainua Portal is required. Create a new connector using Ainua Portal administration and take note of the ainua_url, client_id and client_secret as they will be later needed in the Power Automate workflow.

My information page

As we will be updating the user information to Ainua Portal on the same time, we need to prepare a page in Ainua Portal where to push the data to. Create a new page using Ainua Portal administration with identifier USR. The idea is that this is the page user can view and update his/her information (“My information”).

Change the page to development mode when you are ready to accept the first set of data. In development mode the incoming data content is introduced to the page administration in Ainua Portal.

Power Automate workflow

This workflow is triggered everytime a new contact card is created, an interesting information of an exsting contact card is changed, or a contact card is deleted in Hubspot.

Hubspot integration using Power Automate

Following scenarious are covered:

  • New contact card is created, user has NO portal access
    • Delete contact from Ainua Portal users
  • New contact card is created, user HAS portal access
    • Update contact to Ainua Portal users, update user data to USR page content
  • Existing contact card is changed, user IS GIVEN portal access
    • Update contact to Ainua Portal users, update user data to USR page content
  • Existing contact card is changed, users portal access is REMOVED
    • Delete contact from Ainua Portal users
  • Existing contact is DELETED
    • Delete contact from Ainua Portal users