The Sisense HubSpot connector is a standalone connector that allows you to import data from HubSpot’s API into the ElastiCube Manager. After you have downloaded and installed the connector, you can connect through a connection string you provide Sisense in the ElastiCube Manager. The connection string is used to authenticate users who connect to the HubSpot APIs. To obtain a connection string, you will need to create a HubSpot app.

Once you have connected to HubSpot, you can import a variety of tables from the HubSpot API.

This page describes how to install the HubSpot connector, how to connect to HubSpot with a connection string, and what tables you can import into the ElastiCube Manager:

Installing the HubSpot Connector

Sisense provides the HubSpot connector as a standalone connector that you can download and add to your list of default Sisense connectors.

To install the HubSpot connector:

  1. Download the HubSpot installation file.
  2. Open the installation file and click Install.
  3. After the installation process is complete, click Close.

The HubSpot connector is displayed in the ElastiCube Manager under Add Data > Web Services.

hubspotconnect

Adding HubSpot Tables to your ElastiCube

Sisense uses connection strings to connect to HubSpot and import data into the ElastiCube Manager. The default connection string for HubSpot is: jdbc:hubspot:InitiateOAuth=GETANDREFRESH;

After you connect using the default connection string, Sisense redirects you to Exact’s homepage where you log in and your account is authenticated. Once the account is authenticated, the relevant tables can be added to your ElastiCube.

If you want to customize your connection string, you can by creating an HubSpot app and passing additional connection string parameters. For more information, see Creating an App at the end of this page.

To add HubSpot data:

  1. In ElastiCube Manager, click Add Data and then, HubSpot. The Connect to HubSpot window is displayed.
    connecthubspot
  2. In Datasource Connection String, enter the connection string: jdbc:hubspot:InitiateOAuth=GETANDREFRESH;
  3. Click Connect to Server. You are redirected to the HubSpot Login page.
  4. Log in to your HubSpot account. HubSpot is displayed in the Select Database list in the ElastiCube Manager.
  5. Click OK. Sisense connects to HubSpot and displays a list of tables available for you to import.
  6. Select the relevant tables and click Add.
    The tables are displayed in the ElastiCube Manager.

HubSpot Tables

HubSpot’s RESTful APIs expose the following HubSpot tables that you can import into the ElastiCube Manager through the Sisense HubSpot connector:

NameDescription
BlogAuthorsRetrieve the available blog authors in HubSpot.
BlogPostsRetrieve the available blog posts in HubSpot.
BlogsRetrieve the available blogs in HubSpot.
BlogTopicsRetrieve the available blog topics in HubSpot.
CommentsRetrieve the available comments from your blog in HubSpot.
CompaniesCompanies in HubSpot represent different organizations you are interested in keeping track of for potential marketing opportunities. They are treated similarly like contacts and have a number of custom properties that will be dynamically determined and added to the Companies table from your HubSpot Hub.
CompanyPropertiesCompany properties are the standard and custom pieces of field data that appear in HubSpot.
CompanyPropertyGroupsCompany property groups in HubSpot offer a way of organizing individual types of properties for companies. Each company property must belong to a property group.
ContactsContacts in HubSpot represent different contacts you are interested in keeping track of for potential marketing opportunities. Contacts are similar to companies: They both have a number of custom properties that will be dynamically determined and added to the table from your HubSpot Hub.
ContactListsContact lists in HubSpot can be used to group together contacts with similar characteristics.
ContactListMemberships A list of objects that represents the memberships of a contact from their contact lists. This list may be empty if the record is not a member of any lists.
ContactPropertiesContact properties are the standard and custom pieces of field data that appear in HubSpot.
ContactPropertyGroupsContact property groups in HubSpot offer a way of organizing individual types of properties for contacts. Each contact property must belong to a property group.
DealAssociationsThe deal can be associated with either contacts or companies with each request.
DealPipelinesAllows you to programmatically access options for the 'deal stage' and 'pipeline' properties within your instance of the HubSpot CRM.
>br/> Every portal initially contains a default pipeline with the pipelineId “default”. On portals that have only one pipeline, the pipeline property for any deal will be set to “default” automatically. On portals that have multiple pipelines, if you're setting a dealstage that is not in the default pipeline, you'll also need to set the pipeline property that lines up with the dealstage being used.
DealPipelineStagesA list of stages for this specific pipeline.
DealPropertiesDeal properties are the standard and custom pieces of field data that appear in HubSpot.
DealPropertyGroupsContact property groups in HubSpot offer a way of organizing individual types of properties for contacts. Each contact property must belong to a property group.
DealsDeals in HubSpot represent different organizations you are interested in keeping track of for potential marketing opportunities. They are treated similarly like contacts and have a number of custom properties that will be dynamically determined and added to the Deals table from your HubSpot Hub.
DomainsRetrieve the available domains in HubSpot.
EmailCampaignsEmail campaigns in HubSpot allow you to keep track of and update email marketing campaigns. This table allows you to create, update, and delete your email campaigns in HubSpot.
EmailCampaignEventsThe events associated with an email campaign or a recipient.
EmailSubscriptionsThe subscription types a given email is subscribed to. An email must be specified to return results. Subscriptions may be removed by deleting them.
EmailSubscriptionTypesA list of email subscription types for a HubSpot hub.
EngagementsEngagements represent any of a number of different types of engagements you have in HubSpot. These can very from simple Tasks, to Emails, Calls, Meetings, or others. Due to the different types of engagements available, any individual Engagement will have several columns that come back null due to its type.
FilesRetrieves information about the available files in HubSpot.
FoldersRetrieves information about the available folders in HubSpot.
FormsHubSpot Forms.
OwnersRetrieve the owners in HubSpot.
PagesRetrieve the available pages in HubSpot.
SocialMediaChannelsList available social media channels in HubSpot.
SettingsHubSpot settings.
SocialMediaMessagesSocial media messages.
TemplatesRetrieve the available templates in HubSpot.
UrlMappingsRetrieve the available url mappings in HubSpot.
WorkflowsHubSpot workflows.

Accumulative Builds

Sisense support accumulative builds for all numeric and dates data types. However, the data must be sorted before building the ElastiCube.

Versions

VersionRelease DateImprovements
6.6.0.61April 18, 2017UNIX timestamp was set to local time

Note: HubSpot has deprecated the V1 method of retrieving the OAuth Access token. If you have problems authenticating, you will need to log into your HubSpot account with the same user you are using as your OAuth Client Id/Secret.

After logging into your HubSpot account, go to your application settings and edit the Scopes. Remove any scopes that you might have selected and save the changes. Then, attempt to retrieve your OAuth token again.

For more information, see Migrating from OAuth1 to OAuth 2.0
6.6.0.51March 16, 2017Dates are handled as expected
6.5.1.32January 16, 2017General release

Creating an App

To access HubSpot’s REST API from the ElastiCube Manager with a customized connection string, you must provide valid Oauth HubSpot credentials through a connection string. These credentials are provided by HubSpot when you create an application.

After you receive your credentials from HubSpot, you can create the connection string and provide Sisense with it to connect to your data.

Each connection string contains a authentication parameters that the data source uses to verify your identity and what information you can export to Sisense.

The following is an example of a HubSpot connection string and its mandatory parameters:

jdbc:hubspot:OAuthClientId=xxxxxxxxxxxxxx;OAuthClientSecret=xxxxxxxxxxxxxxxxxx;InitiateOAuth=GETANDREFRESH;
HubId=xxxxxxxxx;CallbackURL=https://localhost;Timeout=0;

  1. HubId: Set your Hubspot account ID to HubId in the connection string.
  2. OAuthClientId: Set this to the client Id in the connection string.
  3. OAuthClientSecret: Set this to the client Id in the connection string.
  4. InitiateOAuth: Set to GETANDREFRESH.
  5. CallbackURL: Following HubSpot’s migration to OAuth 2.0, the CallbackURL needs to be SSL compliant so it should be https://localhost.

For more information about connection strings and optional parameters, see Connection String Parameters.

When you connect to HubSpot, you are redirected to HubSpot’s site where your Administrator must grant access to your account.

Follow the steps below to obtain the OAuth client credentials, the OAuthClientId and OAuthClientSecret:

  1. Log into your HubSpot developer account.
  2. Click Create App.
  3. In the App name field, enter a name and select Public or Private.
  4. Click Create.
  5. In the Apps page, click the name of your app.
  6. Copy the following values and add them to your connection described in the next procedure.

    1. HubId
    2. OAuthClientId
    3. OAuthClientSecret
      Note: Do not select any scopes in your account as this will prevent access to your data.

Switching between Accounts

When you connect to the HubSpot data source, Sisense saves your OAuth values in the file OAuthsettings.txt file located at …\Users\xxx\AppData\Roaming\CData\HubSpot Data Provider on your Sisense server. To connect to the HubSpot data source with another user on the same machine, you must delete the OAuthsettings.txt file. Sisense will then generate a new file for that user.

Another option to support multiple users is to define the location and file name of an OAuthsettings file for each unique user in your connection string through the OAuthSettingsLocation parameter. When each user connects to the data source, Sisense generates the OAuth file with the file name you specify in the location you define. In the examples below, two users are allowed to access the HubSpot data source and for each user, Sisense generates a file that contains that user’s OAuth values in the location defined in the string.

jdbc:hubspot:OAuthSettingsLocation=C:\hubspot\auth\john.txt;OAuthClientId=11276856774486;OAuthClientSecret

=064c70d78567jm2b7e7e4224fad;InitiateOAuth=GETANDREFRESH;Version=2.8;CallbackURL=http://localhost/;

jdbc:hubspot:OAuthSettingsLocation=C:\hubspot\auth\sally.txt;OAuthClientId=11276856774486;OAuthClientSecret

=064c70d78567jm2b7e7e4224fad;InitiateOAuth=GETANDREFRESH;Version=2.8;CallbackURL=http://localhost/;

In the example above, to OAuth files are created, one for John and one for Sally in the location C:\hubspot\auth\.

This is useful if you support many users who each need to access the HubSpot data source.