How to connect Hubspot to Google Sheets

HubSpot offers a broad range of marketing, sales, and customer service software that works together with their core CRM product. Their various packages and platforms feature a significant degree of interoperability, creating a powerful business-focused ecosystem.

In this tutorial, you’ll learn how to connect the Hubspot REST API to Google Sheets in 5 steps using the Apipheny add-on:

  1. Install the Apipheny Add-on
  2. Get your Hubspot API Key
  3. Choose a Hubspot Endpoint URL
  4. Enter the Hubspot API Request into Apipheny
  5. Run the Hubspot API Request

Step 1.) Install and open the Apipheny add-on for Google Sheets

Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.

1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace:

2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.

In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.

open apipheny

Tip: you can open a new Google Sheet by entering this URL in your browser:

Step 2.) Get your Hubspot API Key

1. In your HubSpot account, click the Settings icon in the main navigation bar:

Click Settings
Click Settings

2. In the left sidebar menu, navigate to Integrations > API key:

Go to Integrations > API key
Go to Integrations > API key

3. If a key has never been generated for your account, click the Create key button:

Create Hubspot API key
Create Hubspot API key

Copy the key somewhere safe because you will need it in the next steps.

If you’ve already generated an API key, you can click Show to display your key:

Show Hubspot API key
Show Hubspot API key

Step 3.) Obtain a Hubspot Endpoint URL

In this section, we’ll show you how to browse the Hubspot API documentation to find an endpoint that retrieves the specific information you need from your Hubspot account.

If you already know your URL, or you want to use the same example URL as us, just skip to Step 4.

First, open the Hubspot API documentation page:

The menu on the left, starting with CRM API, contains a list of the available APIs each with its own endpoints.

Clicking on an API takes you to that API’s section, containing a list of associated endpoints.

All API calls to HubSpot should be made to the root domain:

One of the available endpoints, the one we’re using in this example, is Get contact lists:

Each endpoint’s documentation contains the HTTP method used (GET) and the link you should append to the root domain for querying this endpoint (/contacts/v1/lists):

Hubspot API Documentation
Hubspot API Documentation

For endpoints that accept parameters, this documentation is where you would find them listed and explained, along with example inputs and responses.

Step 4.) Enter the Hubspot API URL into Apipheny

Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the Import tab. With the Import tab open, enter these details into the add-on:

Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) required by your API endpoint. For this example, we are using the GET method.

API URL: In Step 3, we explained how you can find the Hubspot REST API endpoint that you need. Now copy the complete URL (root domain + endpoint) into the Apipheny add-on, where it says API URL Path, followed by any GET parameters required for your query.

For this example, we are using the Get all contacts API endpoint, to get all contacts:

API_key is where you enter the API key that we got in step 3.

Headers are not required for this request, so you can leave that section blank in Apipheny.

Here’s what our API request looked like:

Hubspot API request entered in Apipheny
Hubspot API request entered in Apipheny

Step 5.) Run the Hubspot API Request

Click the Run button at the bottom of the Apipheny add-on and then wait for the Hubspot API data to be added to your Google Sheet:

Hubspot API data in Google Sheets
Hubspot API data in Google Sheets

After making a successful request to the Hubspot API, try querying a different endpoint, or try using one of the more advanced features in the Apipheny add-on.

API Tutorials

API Knowledge

What is an API?
What is an API URL?
What are parameters?
What is an endpoint?
What is an API key/token?
What is basic authentication?
What are headers?
What is a GET request?
What is a POST request?