🔌Setting up a Hubspot Connector

HubSpot connector¶

Warning

This connector is deprecated. It is recommented to use the HubSpot connector with Private Apps instead.

This connector is used to retrieve data from the HubSpot API: HubSpot API Documentation

The email events part relies for now on Hubspot’s legacy API: HubSpot legacy API Documentation

Create a HubSpot application¶

First, you need to create a HubSpot application. To do so, you will need a registered HubSpot developer account:

  • Head over to Manage apps.

  • Click on Create app.

  • Once the App Info is filled, click on the Auth part, you’ll see the following:

  • Scroll down to the “Redirect URL” part and fill up the redirect URI.

    • The redirect URI should be like the following pattern:

      • https://api-{your-instance-name}.toucantoco.com/oauth/redirect?type=Hubspot

  • Scroll down to the Add a required scope part:

  • Then add any combination of the following scopes :

    • contacts

    • content

    • forms

    • business-intelligence

    • e-commerce

  • Note that the connector will not work on certain types of data if a scope listed above is not added to the required scopes of your HubSpot application.

  • Do not forget to click on the Save button at the bottom of the page when all your modifications are finished.

How to connect¶

Once your HubSpot application is created, you will need to set-up the client_id and client_secret credentials of your previously created application.

Look at Set up OAuth2 credentials for your platform for more information.

Data provider configuration¶

Once the credentials are set-up, you will need to configure your data provider. All of the pulled data is taken from your HubSpot application, whether it’s about email campaigns, companies, deals, etc.

Go to the connectors interface from the DATA section in the Toucan Studio:

Click on the ADD A CONNECTOR button:

In the search bar, search for the hubspot connector by typing hubspot, then click on the connector:

A pop-up window will open and look like this, click on the account that you wish to link to your connector:

On the next window, all the scopes that are required by the application are displayed; a confirmation is required to link your connector to your hubspot account, just click on Connect app to do so:

You will be redirected to your instance with a new popup with two fields: name and Auth Flow ID. Auth Flow ID should be pre-filled and name empty.

Fill the name part and save your new connector:

Data source configuration¶

Once the data provider is configured, it is possible to add one (or more!) data source that will provide data for your apps.

The HubspotDataset parameter is needed to define the kind of data you want to query in the following list:

  • contacts (default value)

  • companies

  • deals

  • products

  • web-analytics

  • email-events

The HubspotObjectType and parameters parameters are needed for the web-analytics dataset:

  • parameters is a dict-like object that will contain filters that you want to use to filter the resulting data

    • The key must follow this schema: objectProperty.{property}, where property is a value defined in HubSpot’s documentation

    • The value can be anything

  • HubspotObjectType has only one value for now (contact) but this may evolve in the future

Once you are all set, just hit SAVE and voilà!

HubSpot connector (with a private application)¶

This connector is used to retrieve data from the HubSpot API: HubSpot API Documentation

Create a private application¶

First, you need to create a HubSpot private application.

To create one, follow these steps:

  1. Go to the Settings page of your HubSpot account (click on the small gear in the top right corner of the page).

  2. Head over to the Account Setup/Private Apps section.

  3. Click on the Create a private app button.

  1. Fill out the basic information form.

  1. Click on the Scopes tab. Toucan needs a read access on all CRM objects you want to query. The following objects are supported:

    • companies

    • contacts

    • deals

    • owners

    • quotes

  2. Once you’ve ticked all the scopes you need, click on the “Create app” button.

  1. You will now need to copy your app’s access token: Click on the View access token button, and then on Copy in the pop-up.

Connecting Toucan to HubSpot¶

Now that your HubSpot private application is created, you will need to create a connector. Proceed to the connectors tab and click on Create a connector. Search for Hubspot (private application), and click on it:

Then, paste the previously copied access token in the Access token field and click on Save afterwards.

Creating a data source¶

Now that the connector is configured, it is time to add a data source that will provide data for your app.

The HubspotDataset parameter is needed to specify the kind of data you want to query. Pick the desired dataset (note that your private app needs to have the right scopes for that), and click on Validate (or Run preview if you want a preview of your data first).

You’re all done!

Last updated