Print

Import Zendesk Data to Google Sheets

In this guide, we’ll walk through how to pull data from the Zendesk API directly into Google Sheets, using the API Connector add-on.

We'll first get an API token from Zendesk, and then set up a request to pull in Zendesk data to your spreadsheet.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your Zendesk API Token

  1. While logged into your Zendesk account, click Channels > API from the main dashboard.
    zendesk-img1
  2. Tick the checkbox to agree to the terms of service, and click Get Started.
    zendesk-img2
  3. Enable the setting for Token Access, and then click the plus (+) sign to add a new token.
    zendesk-img3
  4. You will now see a token. Copy this and keep it secure as it won't be displayed again.
    zendesk-img4
  5. One last step: Because the Zendesk API requires Basic Authentication, we need to encode our authentication info to base 64. You can do this by entering your your credentials in the format your_email_address/token:your_api_token into this form, i.e. your email address followed by a slash, the word token, a colon, and then your API token. Your encoded credentials will appear underneath (and will be referred to as "your encoded credentials" in subsequent sections).

    The encoding script runs in your browser, and none of your credentials are seen or stored by this site.

     

Part 2: Pull Data from Zendesk to Sheets

The easiest way to get started with the Zendesk API is through API Connector’s built-in integration.

  1. Select Zendesk from the drop-down list of applications
    zendesk-application
  2. Under Authorization, enter your encoded credentials from above, with the word Basic in front.
    zendesk-authorization
  3. Choose an endpoint, for example /groups.json
    zendesk-endpoints
  4. Enter any required parameters. In this case, that's just the subdomain of your site.
  5. Choose a destination sheet, name your request, and hit Run to see the response data in your sheet.
    zendesk-response

Part 3: Create a Custom API Request

Alternatively, you can run your own custom requests instead of using API Connector’s pre-built integration, using any of the endpoints and parameters shown in the API documentation. Substitute in your own encoded credentials where it says your_encoded_credentials. Here's an example request setup:

  • ApplicationCustom
  • MethodGET
  • Request URLhttps:/your_site.zendesk.com/api/v2/search.json?query=created>2022-05-01
  • Headers:
    • Authorization: Basic your_encoded_credentials
zendesk-response

Part 4: Handle Pagination

Zendesk limits the number of records returned in each request. By default, only 100 records will be returned unless you use the 'page' parameter as described in their documentation.
zendesk-img8

With API Connector, you can cycle through their "next_page" links automatically with pagination handling, like this:

  • Pagination: next page URL
  • Next page path: next_page
  • Run until: choose when to stop fetching data
    zendesk-pagination-nextpageurl

Part 5: API Documentation

Official API documentation: https://developer.zendesk.com/rest_api/docs/support/introduction

Leave a Comment

Jump To