How to integrate the Zendesk API with Google Sheets

Zendesk is one of the most popular CRM softwares in the world.

In this tutorial, I’ll show how you, in 5 steps, how to connect the Zendesk API to Google Sheets:

  1. Install the Apipheny add-on
  2. Enable Password Access in Zendesk
  3. Choose a Zendesk API Endpoint
  4. Enter your Zendesk API request into Apipheny
  5. Run the Zendesk API request

Step 1.) Install and open the Apipheny Add-on in Google Sheets

To pull data from the Zendesk API to Google Sheets, you’ll have to install and open the Apipheny Google Sheets add-on.

Apipheny is a no-code API integrator for Google Sheets that you can use to make unlimited API requests to almost any API (including the Zendesk API), connect to unlimited APIs, save your API requests, schedule API requests to refresh data on a daily or hourly basis, and more. Click here for more info about Apipheny. There’s a free trial included when you sign up today.

1. Install Apipheny by opening the following link in on desktop and then clicking the Install button on the page: https://gsuite.google.com/marketplace/app/apipheny/966163326746

Install Apipheny in the G-Suite Marketplace
Install Apipheny in the G-Suite Marketplace

2. After you’ve installed Apipheny, open a Google Sheet and then click on “Add-Ons” in the menu at the top. In the add-ons menu, you should see Apipheny. Just click Apipheny > Import API to open the Apipheny sidebar in your Google Sheets.

Open the Apipheny add-on in your Google spreadsheet to make an API request
Open the Apipheny add-on in your Google spreadsheet to make an API request

Step 2.) Enable Password Access

The next thing you need to do is enable password access.

In your Zendesk account, click the Support tab:

Go to the support page in your Zendesk account
Go to the support page in your Zendesk account

Then click the Settings icon from the menu on the left, then in the Channels section, click the API option.

Check the Zendesk terms agreement checkbox and then click the Get Started button:

Go to Settings > Channels > API > Check the box > Click "Get Started"
Go to Settings > Channels > API > Check the box > Click “Get Started”

In the Settings tab, enable the Password Access toggle:

Enabling password access in my Zendesk account
Enabling password access in my Zendesk account

Step 3.)  Choose a Zendesk API Endpoint

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

Every API has a URL. Every API URL has an endpoint, which is the specific API URL that will retrieve the exact data you need from your Zendesk account.

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

To get your Zendesk API endpoint, first open the Zendesk API documentation page: https://develop.zendesk.com/hc/en-us/sections/360000203988-API-reference-docs

On this page, you should see a list of Zendesk APIs:

Zendesk API documentation
Zendesk API documentation

Click one of these APIs (the Support API, for example) to open the documentation page for that specific API:

Zendesk Support API documentation
Zendesk Support API documentation

The menu on the left contains an introduction to the API and a list of categorized endpoints:

Zendesk Support API endpoints
Zendesk Support API “endpoints”

An example endpoint is the List Users endpoint, from the Users category, which returns the users data. These are the URLs for this endpoint:

https://{your_domain}.zendesk.com/api/v2/users.json

https://{your_domain}.zendesk.com/api/v2/groups/{id}/users.json

https://{your_domain}.zendesk.com/api/v2/organizations/{id}/users.json

The documentation for this endpoint contains a list of supported HTTP methods and URLs, a short paragraph detailing the endpoint’s usage, a section showing how to call the endpoint using cURL, and a list of the accepted parameters and values. The documentation for this endpoint also shows an example request and the expected response:

Zendesk API endpoint documentation example
Zendesk API endpoint documentation example

All API calls to Zendesk should be made to the Zendesk API base/root domain:

https://{your_domain}.zendesk.com/api/v2/

Step 4.) Enter your Zendesk 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 Zendesk API endpoint that you need. Now copy the complete URL into the Apipheny add-on, where it says API URL Path (JSON / CSV), followed by any GET parameters required for your query. For this example, we are using the List Groups endpoint, which displays the available groups. The corresponding API URL is:

https://{your_domain}.zendesk.com/api/v2/groups.json

If you’re using the same example as us, just copy and paste this URL into the Apipheny add-on but replace “{your_domain}” with your Zendesk business domain.

Headers: In the “Headers” section of the Apipheny add-on, add one row with the following key and value:

Header
Key:
Authorization
Value:
Basic <your_coded_key>

where <your_coded_key> is obtained by base64-encoding your credentials, separated by the “:” character. You can use this website to perform the encoding: https://www.base64encode.org/. Just go to that website, enter your Zendesk username and password like this username:password and click “Encode” to get the value that you will replace <your_coded_key> with.

Note: For the header “value”, there should be a literal space between Basic and <your_coded_key>. Do not include the brackets “<>” around your key.

Here’s what your Zendesk API request should look like when entered into Apipheny:

Zendesk API request entered into the Apipheny add-on
Zendesk API request entered into the Apipheny add-on

Step 5.) Run the Zendesk API Request in your Google Sheet

The last step to get Zendesk data in your Google Sheet is to click the Run button at the bottom of the Apipheny add-on. If you’ve set up your API request correctly, then your Zendesk data will be imported into your Google Sheet, like so:

That’s it! That’s how to integrate the Zendesk API with your Google Sheet.

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

  • Save and schedule your Zendesk API request
  • Make a POST request to the Zendesk API (if available)
  • Use the custom =APIPHENY() function to call the Zendesk API request inside a cell of your spreadsheet
  • Create an API request by referencing the value of a cell in the API URL with three curly braces eg. {{{Sheet1!A1}}}

If you want to get Zendesk data into Google Data Studio, just follow the steps above, and then connect your Google Sheet with Google Data Studio.

Apipheny API connection demo

Related Articles:

Related Posts