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:
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: https://apipheny.io/install
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.
Tip: you can open a new Google Sheet by entering this URL in your browser:
1. In your HubSpot account, click the Settings icon in the main navigation bar:
2. In the left sidebar menu, navigate to Integrations > API key:
3. If a key has never been generated for your account, click the Create key button:
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:
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 https://api.hubapi.com 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):
For endpoints that accept parameters, this documentation is where you would find them listed and explained, along with example inputs and responses.
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:
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:
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:
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.
Make a GET request
Make a POST request
PUT, PATCH, & DELETE Requests
Save requests for later
Schedule requests for automatic updates
Reference cell values in requests
=APIPHENY custom function
Stack multiple URLs in a single request
Run all saved requests at once
Modify your request settings
Import & export saved API settings
Alpha Vantage API
Constant Contact API
Facebook Graph API
Facebook Ads API
Google SERP API
Linkedin Ads API
Product Hunt API
Reddit Ads API
Riot Games API