Hubspot Connector
Documentation
Version: 5
Documentation

Read data from Hubspot in SSIS (Export data)


In this section we will learn how to configure and use Hubspot Connector in API Source to extract data from Hubspot.

  1. Begin with opening Visual Studio and Create a New Project.

  2. Select Integration Service Project and in new project window set the appropriate name and location for project. And click OK.

  3. In the new SSIS project screen you will find the following:

    1. SSIS ToolBox on left side bar
    2. Solution Explorer and Property Window on right bar
    3. Control flow, data flow, event Handlers, Package Explorer in tab windows
    4. Connection Manager Window in the bottom
    SSIS Project Screen
    Note: If you don't see ZappySys SSIS PowerPack Task or Components in SSIS Toolbox, please refer to this help link.

  4. Now, Drag and Drop SSIS Data Flow Task from SSIS Toolbox. Double click on the Data Flow Task to see Data Flow designer.
    SSIS Data Flow Task - Drag and Drop

  5. From the SSIS toolbox drag and API Source (Predefined Templates) on the data flow designer surface, and double click on it to edit it:
    SSIS API Source (Predefined Templates) - Drag and Drop

  6. Select New Connection to create a new connection:
    API Source - New Connection

  7. Use a preinstalled Hubspot Connector from Popular Connector List or press Search Online radio button to download Hubspot Connector. Once downloaded simply use it in the configuration:

    Hubspot
    Hubspot Connector Selection

  8. Proceed with selecting the desired Authentication Type. Then select API Base URL (in most cases default one is the right one). Finally, fill in all the required parameters and set optional parameters if needed. You may press a link Steps to Configure which will help set certain parameters. More info is available in Authentication section.

    Private apps allow you to use HubSpot's APIs to access specific data from your HubSpot account. You can authorize what each private app can request or change in your account, which will generate an access token that's unique to your app. [API reference]

    Steps how to get and use Hubspot credentials

    Follow these instructions to create a Private app in HubSpot and configure HubSpot authentication in SSIS package or ODBC data source:

    1. First of all, go to HubSpot portal.
    2. Then click Data Management option on the left and then hit Integrations menu item: Go to integrations in HubSpot
    3. Move on by clicking Private Apps menu item and then click Create a private app button to create one: Create private app to get HubSpot data via REST API
    4. Then continue by following the instructions on HubSpot Docs.
    5. Once you create an app, go to SSIS package or ODBC data source and in Private App authentication set these parameters:
      • For AccessToken field use Access token value from the Private app configuration in HubSpot.
    6. Done! Now you are ready to use HubSpot Connector!

    Configuring authentication parameters
    Hubspot
    Private app (Static Access Token) [Http]
    https://api.hubapi.com
    Required Parameters
    AccessToken Fill-in the parameter...
    Optional Parameters
    RetryMode RetryWhenStatusCodeMatch
    RetryStatusCodeList 429
    RetryCountMax 5
    RetryMultiplyWaitTime True
    ZappySys Http Connection

    In HubSpot, a public app is a type of integration that can be installed on customer accounts or listed on the App Marketplace. It requires authentication via OAuth. Once a user installs your app on their HubSpot account, you’ll be able to make API calls to that account using an OAuth access token. [API reference]

    Steps how to get and use Hubspot credentials

    Follow these instructions to create a Public app in HubSpot and configure HubSpot authentication in SSIS package or ODBC data source:

    1. First of all, if you don't have HubSpot Developer's account, register one.
    2. Go to HubSpot and select your Developer account.
    3. Click Apps on the left hand side and then click Create app button to create a Public app: Create public app to get HubSpot data via REST API
    4. Then continue by following the instructions in HubSpot Docs.
      NOTE: If you don't have a working Redirect URL, you can use https://zappysys.com/oauth (it's safe).

    5. Once you create an app, go to SSIS package or ODBC data source and in Public app authentication set these parameters (use values from your Public app configuration in HubSpot):
      • For ClientId field use Client ID value.
      • For ClientSecret field use Client secret value.
      • For Scope field use Scopes values, e.g.:
        accounting
        tickets
        files
        
        crm.lists.read
        crm.lists.write
        
        crm.objects.contacts.read
        crm.objects.contacts.write
        crm.schemas.contacts.read
        
        crm.objects.custom.read
        crm.objects.custom.write
        crm.schemas.custom.read
        
        crm.objects.companies.read
        crm.objects.companies.write
        crm.schemas.companies.read
        
        crm.objects.deals.read
        crm.objects.deals.write
        crm.schemas.deals.read
        
        crm.objects.quotes.read
        crm.objects.quotes.write
        crm.schemas.quotes.read
        
        crm.objects.line_items.read
        crm.objects.line_items.write
        crm.schemas.line_items.read
        
        NOTE: You can use other scopes too, but they must match the scopes defined in your Public app.

      • For ReturnUrl field use one of Redirect URLs.
    6. When you are done with that, click Generate Token button to generate Access and Refresh Tokens.
    7. Done! Now you are ready to use HubSpot Connector!

    Configuring authentication parameters
    Hubspot
    Public app [OAuth]
    https://api.hubapi.com
    Required Parameters
    UseCustomApp Fill-in the parameter...
    Scope (Must Match with App Scopes) Fill-in the parameter...
    Optional Parameters
    Client ID
    Client Secret
    ReturnUrl
    RetryMode RetryWhenStatusCodeMatch
    RetryStatusCodeList 429
    RetryCountMax 5
    RetryMultiplyWaitTime True
    ZappySys OAuth Connection

    Deprecated authentication method. Use [Private app] instead. [API reference]

    Steps how to get and use Hubspot credentials

    Using HubSpot API key is deprecated method for authentication. Use Private app authentication instead. If you still need one, then follow these instructions to get HubSpot API key:

    • First of all, if you don't have HubSpot Developer's account, register one.
    • Go to HubSpot and select your Developer account.
    • Click Apps on the left hand side and then click Get HubSpot API key button to get one: Get HubSpot API key
    • When a popup appears, click Show Key button and then hit Copy button to copy API key: Use API key to read HubSpot data via REST API
    • Once copy the API key, go to SSIS package or ODBC data source and use it in API Key authentication configuration:
      • Paste it in ApiKey parameter field.
    • Done! Now you are ready to use HubSpot Connector!

    Configuring authentication parameters
    Hubspot
    Developer API key (Deprecated) [Http]
    https://api.hubapi.com
    Required Parameters
    ApiKey Fill-in the parameter...
    Optional Parameters
    RetryMode RetryWhenStatusCodeMatch
    RetryStatusCodeList 429
    RetryCountMax 5
    RetryMultiplyWaitTime True
    ZappySys Http Connection

  9. Select the desired endpoint, change/pass the properties values, and click on Preview Data button to make the API call.

    API Source - Hubspot
    Hubspot Connector can be used to integrate Hubspot and your data source, e.g. Microsoft SQL Server, Oracle, Excel, Power BI, etc. Get, write, delete Hubspot data in a few clicks!
    API Source - Select Endpoint

  10. That's it! We are done! Just in a few clicks we configured the call to Hubspot using Hubspot Connector.

    You can load the source data into your desired destination using the Upsert Destination, which supports SQL Server, PostgreSQL, and Amazon Redshift. We also offer other destinations such as CSV, Excel, Azure Table, Salesforce, and more. You can check out our SSIS PowerPack Tasks and components for more options. (*loaded in Trash Destination)

    Execute Package - Reading data from Hubspot and load into target