Get HubSpot App Token

You will need to enter a HubSpot app token when setting up a Cast Datasource for to query your HubSpot objects. If you forgot your app token or never used one before, you can get a new app token by following the steps below:

  1. In your HubSpot account, click Settings > Integrations > Private Apps.
  2. Click “Create private app.”
  3. Enter a name for your app and select the scopes you need.
  4. Click “Create app.”
  5. Copy your access token from the app details page.

Creating a HubSpot Datasource

  1. Navigate to the Datasets screen in designer by clicking on “Home” at the top of the screen and selecting “Datasets”.
  2. Click on “Add New Dataset”.
  3. Select “Add a Data Source” and choose “HubSpot” in the popup.
  4. On the datasource setup screen, enter your HubSpot access token that you got earlier and provide a descriptive name.
  5. Click on “Add Configuration”.

Creating Datasets from HubSpot Datasources

  1. After adding a datasource, locate the HubSpot datasource you just created. If you cannot see it, return to the Datasets screen by following Step 1 and 2 in the section above. “Creating a HubSpot Datasource”.
  2. Click on the Hubspot datasource that you created in the previous step.
  3. Query your Hubspot objects, assign a name to the dataset, and save.

Combine and Transform HubSpot Datasets

  1. Navigate to datasets page
  2. Click on Add New Dataset Button
  3. Select Query Datasets
  4. Perform aggregations, transformations, and joins of your HubSpot data powered with SQL syntax.

    For example, to get contacts with only their id and email properties use:

         "table": "contacts"
         "properties": "email"

    or to get all the contacts and their properties use:

         "table": "contacts"

    That’s it! You can replace contacts with any other objects you have including custom objects. The HubSpot datasource also supports associations, for example:

         "table": "contacts"
         "associations": "companies"
         "properties": "firstname"
  5. Now that your query is set run the query by clicking the “Run” button.
  6. If the query is successful, give the dataset a unique name and save it.

Video showing

  • Creating a HubSpot Dataset
  • Creating datasets from HubSpot datasource
  • Combining and Transforming the HubSpot Dataset
  • Using the Dataset in a data-driven slide