Hubspot
Instructions on how to authenticate Hubspot
Creating a developer app
To connect HubSpot with Middle, you'll need to create either a public or private app in HubSpot to facilitate the connection.
Public App
For detailed guidance on creating a public developer app, refer to HubSpot's developer documentation. Additionally, you can follow the Middle-specific instructions provided below.
Create a Hubspot developer account
If you don't already have one, you will need to create a Hubspot developer account.
Create a new app
In your developer account, navigate to Apps in the main navigation bar.
In the upper right, click Create app.
Fill in the App Info tab with the relevant information. It’s a good idea to describe the app's purpose.
Go to the Auth page.
Scroll down to Redirect URLs.
Enter the following URL, replacing
{ENTER YOUR INSTANCE NAME HERE}
with your instance name:{ENTER YOUR INSTANCE NAME HERE}.middle.app/oauth-redirect-uri/
.Scroll down to Scopes.
Check off the
oauth
scope as required and the following scopes as conditional:crm.import
crm.objects.contacts.read
crm.objects.deals.read
crm.objects.deals.write
crm.objects.custom.read
crm.objects.custom.write
crm.objects.marketing_events.read
automation
forms
e-commerce
tickets
crm.schemas.custom.read
crm.schemas.contacts.read
crm.schemas.contacts.write
Click Save to save the app.
Add app public credentials to Middle
You will need to retrieve the Client ID and Client Secret for your new app and add them to Keys section of your instance's HubSpot app along with your redirect URL. These details need to be added in JSON format. Below is an example:
You should now be all set to authenticate Hubspot in your instance.
Private app
For more information on how to create a private app, refer to Hubspots directions. Otherwise, follow the instructions below.
In your HubSpot account, click the settings icon in the main navigation bar.
In the left sidebar menu, navigate to Integrations > Private Apps.
Click Create private app.
On the Basic Info tab, configure the details of your app:
Enter your app's name.
Hover over the placeholder logo and click the upload icon to upload a square image that will serve as the logo for your app.
Enter a description for your app.
Click the Scopes tab.
Check off the following scopes:
crm.objects.contacts.write
crm.objects.contacts.read
crm.objects.deals.write
crm.objects.deals.read
crm.objects.custom.read
crm.objects.custom.write
crm.schemas.contacts.write
crm.schemas.contacts.read
crm.schemas.custom.read
crm.objects.marketing_events.read
ecommerce
oauth
tickets
forms
crm.import
automation
Click Create app in the top right.
In the dialog box, review the info about your app's access token, then click Continue creating. Middle will need the
client_secret
.Click to finish creating the app.
Add private app credentials to Middle
You will need to retrieve the client_secret
for your private app and add it to the Keys section of your instance's HubSpot app along with your redirect URL. These details need to be added in JSON format. Below is an example:
Assuming that you don't want this app used by any other account within your Middle organization, you should toggle on Use allowed accounts? and then select the account you want to have access to these credentials. You'll then need to select this API Key entry on the Hubspot app connection's Edit app connection page in the account your are trying to connect. When using a private app you'll want to complete the OAuth flow in the app connection to establish an initial connection.
Syncing contact custom properties
Custom properties can be synced into HubSpot for Contacts. For flexibility, properties are synced as arrays of key/value pairs. There is one array for each data type: strings, numbers, dates, datetimes, and arrays of strings. You can use array manipulation tools to integrate these custom properties into your workflow.
Selecting properties to sync
In your Hubspot connection's authentication, you'll need to list which custom properties you'd like to sync. This is set up to help limit the size of your contact records.
On the app connection page, you'll need to enter the internal property name (found in the property manager) under Custom Fields For Contacts.
Last updated