Tableau is a powerful tool that helps organizations analyze and visualize their data.

In this article, we will talk about analyzing your HubSpot data with Tableau and the 2 different methods that can be used for HubSpot Tableau Integration.

The Sales, Marketing, and Customer data are invaluable in terms of analysis. Organizations can depend on the insights obtained from it to make conscious data-driven decisions.

Streamline your Hubspot Data Migration for analysis-ready data!

Struggling to migrate your Sales, Marketing, and Customer data from Hubspot? Hevo makes it a breeze with its user-friendly, no-code platform. Here’s how we simplify the process:

  1. Seamlessly pull data from HubSpot and over 150+ other sources with ease.
  2. Utilize drag-and-drop and custom Python script features to transform your data.
  3. Efficiently migrate data to a data warehouse, ensuring it’s ready for insightful analysis in Tableau.

Experience the simplicity of data integration with Hevo and see how Hevo helped fuel FlexClub’s drive for accurate analytics and unified data.

Get Started with Hevo for Free

What is HubSpot?

  • HubSpot provides Sales, Marketing, Content Management, and Customer Support Services for software technologies.
  • It houses some amazing tools that can help optimize your content using SEO to rank better in Google search results.

What is Tableau?

  • Tableau is a Business Intelligence platform that helps you analyze your data and visualize it in the form of various charts and graphs.
  • These visualizations help you understand your data better, derive insights, and make business decisions.

Prerequisites

  • A HubSpot developer account.
  • A Tableau account.

Manual Method to Connect HubSpot Tableau Integration

Step 1: Install the Client Library

Given below are the different client libraries supported by HubSpot. Install the library from the links given below that you want to use to make API call:

Language Package Link
Node.jshttps://www.npmjs.com/package/@HubSpot/apiclient
PHPhttps://packagist.org/packages/HubSpot/apiclient
Rubyhttps://rubygems.org/gems/HubSpotapiclient
Python https://pypi.org/project/HubSpotapiclient/

Step 2: Get the Authentication Key

  • Log in to your HubSpot developer account. Click the settings icon in the main navigation bar. Now move your mouse to Integrations and click on the API key.
  • If a key hasn’t been generated click Generate an API key option. If there is an active key, click on Show and a window will pop up with the API key. 

Step 3: Identify the Required API

  • Once you install a client library, you need to identify the API call from the HubSpot resource. For fetching different data HubSpot provides different APIs.
  • You can use GET, POST, PUT and DELETE methods for the same.
  • For example, to fetch all lead-specific data using the contacts API, we need to use GET /contacts/v1/lists/all/contacts/all method. Refer official page to view implementation using different clients.

Step 4: Implement the API Call

  • In this article, an API call has been made using a Python client. All the HubSpot API calls return data in JSON format.

Sample Python code:

import requests
import json
import urllib

max_results = 500 
hapikey = 'demo' 
count = 5 
contact_list = []
property_list = []
get_all_contacts_url = "https://api.hubapi.com/contacts/v1/lists/all/contacts/all?"
parameter_dict = {'hapikey': hapikey, 'count': count}
#type your Authentication key in place of hapikey
headers = {}

# Paginate your request using offset
has_more = True
while has_more:
	parameters = urllib.urlencode(parameter_dict)
	get_url = get_all_contacts_url + parameters
	r = requests.get(url= get_url, headers = headers)
	response_dict = json.loads(r.text)
	has_more = response_dict['hasmore']
	contact_list.extend(response_dict['contacts'])
	parameter_dict['vidOffset']= response_dict['vidoffset']
	if len(contact_list) >= max_results: # Exit pagination, based on whatever value you've set your max results variable to. 
		print('maximum number of results exceeded')
		break
print('loop finished')

list_length = len(contact_list) 

print("You've succesfully parsed through {} contact records and added them to a list".format(list_length))

Step 5: Prepare the HubSpot Data

Sample Response Data: Here data is extracted in JSON format.

Example response:
{
  "contacts": [
    {
      "addedAt": 1390574181854,
      "vid": 204727,
      "canonicalvid": 204727,
      "mergedvids": [
        
      ],
      "portalid": 62515,
      "iscontact": true,
      "properties": {
        "firstname": {
          "value": "Bob"
        },
        "lastmodifieddate": {
          "value": "1483461406481"
        },
        "company": {
          "value": ""
        },
        "lastname": {
          "value": "Record"
        }
      },
      "formsubmissions": [
        
      ],
      "identityprofiles": [
        {
          "vid": 204727,
          "savedattimestamp": 1476768116149,
          "deletedchangedtimestamp": 0,
          "identities": [
            {
              "type": "LEAD_GUID",
              "value": "f9d728f1dff149b09caa247dbdf5b8b7",
              "timestamp": 1390574181878
            },
            {
              "type": "EMAIL",
              "value": "mgnewemail@HubSpot.com",
              "timestamp": 1476768116137
            }
          ]
        }
      ],
      "mergeaudits": [
        
      ]
    },
    {
      "addedAt": 1392643921079,
      "vid": 207303,
      "canonicalvid": 207303,
      "mergedvids": [
        
      ],
      "portalid": 62515,
      "iscontact": true,
      "properties": {
        "firstname": {
          "value": "Ff_FirstName_0"
        },
        "lastmodifieddate": {
          "value": "1479148429488"
        },
        "lastname": {
          "value": "Ff_LastName_0"
        }
      },
      "formsubmissions": [
        
      ],
      "identityprofiles": [
        {
          "vid": 207303,
          "savedattimestamp": 1392643921090,
          "deletedchangedtimestamp": 0,
          "identities": [
            {
              "type": "EMAIL",
              "value": "email_0be34aebe5@abctest.com",
              "timestamp": 1392643921079
            },
            {
              "type": "LEAD_GUID",
              "value": "058378c6951343e1a13a43a98d47aa22",
              "timestamp": 1392643921082
            }
          ]
        }
      ],
      "mergeaudits": [
        
      ]
    }
  ],
  "hasmore": true,
  "vidoffset": 207303
}

Since the data fetched by the API is in JSON format the data needs to be formatted before moving it into Tableau. For this, you need to identify the schema of the Database or Data Warehouse and specify the data formats according to the data fetched.

Step 6: Move the Data into Tableau

  • Your data is now ready for analysis. Create a new workbook in Tableau and load data into it using load data from a data source option.
  • Using Tableau, you can analyze this fetched data, and create visualizations and Dashboards.

Conclusion

This article offered valuable insights into HubSpot, Tableau, and the different approaches you can use to set up a HubSpot-Tableau integration. Although it is possible to build the integration manually, the process can be lengthy, intricate, and error-prone. Opting for a streamlined solution can save time, reduce complexity, and minimize the risk of mistakes, enabling you to focus more on leveraging your data effectively.

Want to give Hevo a try?

Sign Up for a 14-day free trial and experience the feature-rich Hevo suite first hand. You may also have a look at the amazing Hevo Price, which will assist you in selecting the best plan for your requirements.

    FAQ

    Can HubSpot connect to Tableau?

    Yes, HubSpot can connect to Tableau through third-party connectors or APIs to pull CRM data for visualization.

    How to connect Tableau to CRM?

    To connect Tableau to a CRM, use the native connectors if available (like Salesforce), or rely on APIs or third-party ETL tools to integrate and visualize CRM data in Tableau.

    What platforms does Tableau integrate with?

    Tableau integrates with platforms such as Salesforce, Google Analytics, AWS, Microsoft SQL Server, MySQL, Oracle, and many others via native connectors and APIs.

    Easha Meher
    Research Analyst, Hevo Data

    Easha is a programming enthusiast with 2+ years of experience. She has worked in automation test script creation, regression testing, and integration projects like Thyrocare Integration. She has a bachelor's degree in Computer Science and loves writing technical articles about data engineering. Her goal is to help people solve everyday problems through her work.