How to offer a HubSpot integration inside of your product cover

How to offer a HubSpot integration inside of your product

David Molot profile image

by David Molot

Feb 17th 2022

Offering integrations to your users has become an essential part of growing your B2B SaaS product - which is why today we will walk through how to set up your HubSpot oauth app, connect to the HubSpot API and offer your users a HubSpot connector!

Setting up your HubSpot OAuth App

The first thing you must do is make sure you have a HubSpot developer account. If you don’t currently have one, you can sign up for one right here.

Screen Shot 2022-02-11 at 1.43.50 PM.png

When you log in to your developer account, it should look something like this. Go ahead an click on the Apps tab on the top left side of your screen.

Screen Shot 2022-02-11 at 1.46.42 PM.png

Now that you are on the apps page, we need to go ahead and begin configuring your HubSpot app to continue building your HubSpot integration. Click on the Create app button to start!

Screen Shot 2022-02-11 at 2.40.05 PM.png

Here you should fill in the HubSpot Marketplace app with your information. The app should be titled with the Company name, your own logo, and your own description. At this point, you should click the Save button in the bottom left corner.

Screen Shot 2022-02-11 at 2.59.58 PM.png

Next you will need to head to the Auth tab of the HubSpot app.

Screen Shot 2022-02-11 at 3.04.52 PM.png

On this page, you will find your Client ID and Client secret - we will need those later so you can either note them down now or remember that you will need to come back and grab these. To continue configuring our HubSpot connector, scroll down the page until you see the Redirect URL (visible at the bottom of the image above).

Screen Shot 2022-02-11 at 3.19.57 PM.png

Now you need to input the Redirect URL. The URL should be:

Screen Shot 2022-02-14 at 10.28.40 AM.png

Once you have done that, you can go ahead and continue on to the Scopes section of the OAuth app. Click on the CRM option.

Screen Shot 2022-02-14 at 10.35.44 AM.png

Now is where you need to start really configuring what data you want to pull out of HubSpot, or the data you want to push to HubSpot. Of course, HubSpot’s data model may be different than the data model you use internally, but we will get to that later. For right now, let’s just make sure we have the right permissions!

Screen Shot 2022-02-14 at 10.57.19 AM.png

I decided to check off all the scopes under CRM, but remember, you should only check off what you deam as necessary for your users. The next step is to go into the Legacy section of the scopes and check off a few very important scopes.

Screen Shot 2022-02-14 at 11.39.49 AM.png

As you can see, we have checked off at least 6 of the scopes in the Legacy section. These are extremely important, as they allow for your app to utilize the HubSpot OAuth functionality (instead of your users needing to provide a HubSpot API key) to connect with your customer’s HubSpot accounts!

These scopes also allow for your app to recognize custom objects - so if your customers are often making custom properties within HubSpot or you want to be able to push your own custom objects to their HubSpot accounts, these scopes need to be enabled for your app.

Screen Shot 2022-02-14 at 12.24.40 PM.png

Now that you are done configuring the scopes, make sure you click Save, or else your app settings will not be configured.

Setting up your HubSpot integration

Now that you have completed setting up your HubSpot OAuth app, you should head over to hotglue to build the integration. You can login or create your account (there is a 14-day free trial) here.

Screen Shot 2022-02-14 at 3.36.35 PM.png

Once you are inside of hotglue, you can head to one of the flows that you would like to add the HubSpot integration to. If you don’t know what a flow is, you can learn more about it here.

Screen Shot 2022-02-14 at 3.52.14 PM.png

Now you should enable the HubSpot integration. Do so by searching for HubSpot in the Search taps bar and clicking the Connect button.

Screen Shot 2022-02-14 at 3.56.40 PM.png

Now is when you need to grab the HubSpot OAuth credentials that were created when you created your HubSpot OAuth app.

Screen Shot 2022-02-14 at 4.38.43 PM.png

Now that I put my credentials in, I will go ahead and click Save & Connect.

Screen Shot 2022-02-14 at 4.39.34 PM.png

I will now be asked to connect a testing account - this is purely for testing purposes so that you can understand what data coming out of HubSpot will look like. Go ahead and login with the HubSpot account you have!

Screen Shot 2022-02-15 at 7.44.03 AM.png

Now comes time for the configuration of the field mapping. To begin, click on the HubSpot card.

Screen Shot 2022-02-15 at 7.52.44 AM.png

Once you have done that, you need to head to the Field Mapping option.

Screen Shot 2022-02-15 at 8.07.56 AM.png

Now that we are on the field mapping page, I am going to ahead and begin selecting what data we want to pull. I am going to start with the companies table by clicking the corresponding gear icon.

Screen Shot 2022-02-15 at 8.12.28 AM.png

I am now going to select a few of these fields and bring them over to the chosen column.

Screen Shot 2022-02-15 at 8.13.24 AM.png

Now that I am done selecting the fields I want, I am going to click the Confirm button.

Screen Shot 2022-02-15 at 8.20.09 AM.png

Now you should repeat this for the rest of the data you want to pull. Once you are done, you can go ahead and click Save. You have now configured your HubSpot integration!

The end-user experience

Now that you have set up your HubSpot integration, let’s look at how it would feel for one of your users to connect their HubSpot account to your product.

Screen Shot 2022-02-15 at 9.53.16 AM.png

Here I have a little demo webapp where we wil show how your user would connect a HubSpot account. I am going to click Open widget to begin the process.

Screen Shot 2022-02-15 at 10.18.58 AM.png

As you can see, I have the CRM flow here that the HubSpot source is in. I will go ahead and Click on the CRM flow.

Screen Shot 2022-02-15 at 10.19.35 AM.png

Now we see that HubSpot is available as a source to connect. I will click on the HubSpot option!

Screen Shot 2022-02-15 at 10.24.51 AM.png

Then, I will be asked to log in to HubSpot.

Screen Shot 2022-02-15 at 10.25.25 AM.png

It will then ask what account we want to connect to the platform (when you build your own OAuth app, it will show your own logo and your own OAuth app name).

Screen Shot 2022-02-15 at 10.27.23 AM.png

And voila! The HubSpot account is just linked. That would complete the user journey when it comes to connecting their HubSpot account to your platform.

Wrapping it up

Now you can see how easy it is to build a HubSpot integration, without having to think about HubSpot custom properties, HubSpot tickets, HubSpot email APIs, or even building your own HubSpot connector!

Our hope is now you can see how your product can offer one of the best HubSpot integrations while minimizing the development work required to offer it! No dealing with HubSpot OAuth or grabbing HubSpot API keys, but a more plug and play enterprise-ready integration.

If you want to check out hotglue, feel free to sign up for an account here (there is a 14-day integration).