Zendesk is one of the most popular CRM softwares in the world.
In this tutorial, we’ll show how you how to connect the Zendesk API to Google Sheets in 5 steps:
Apipheny is a free API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to API data sources, easily.
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: sheet.new
The next thing you need to do is enable password access.
In your Zendesk account, click the Support tab:
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:
In the Settings tab, enable the Password Access toggle:
If you have an account where you sign in with Google instead of with a Zendesk email and password, you will also need to create an API token.
On the same screen, below Password Access, make sure you enable Token Access and then click on the Add API token button next to Active API Tokens:
You will now need to fill the description field and copy the new token to a safe location, before clicking the Save button:
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.
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:
Click one of these APIs (the Support API, for example) to open the documentation page for that specific API:
The menu on the left contains an introduction to the API and a list of categorized 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:
All API calls to Zendesk should be made to the Zendesk API base/root domain:
https://{your_domain}.zendesk.com/api/v2/
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
Replace your_coded_key with the value you get from 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.
If you’re using token based authentication, you will need to format your username and password like this: username/token:your_token when you encode them. Make sure to use your token that you generated and copied in Step 2., not your Google password.
Here’s what our Zendesk API request looked like when entered into Apipheny:
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.
Schedule requests for automatic updates
Reference cell values in requests
Stack multiple URLs in a single request
Crypto API Tutorials: