Import Zendesk Data to Google Sheets

Import Zendesk Data to Google Sheets

Zendesk is an online customer support platform. 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 key from Zendesk, and then set up a request to pull in user data to your spreadsheet.

PART 1: GET YOUR ZENDESK API KEY

  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 {email_address}/token:{api_token} into this form. Your encoded credentials will appear underneath.

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

    (If you have any problems with the above, please check this post for some alternate methods of encoding your credentials).

PART 2: CREATE YOUR API REQUEST URL

We’ll follow the Zendesk documentation to access a list of users.

  • API root: https://{subdomain}.zendesk.com/api/v2/
    API root example: https://mixeddemo.zendesk.com/api/v2/
  • Endpoint: /users.json

Putting it together, we get the full API Request URL:
https://mixeddemo.zendesk.com/api/v2/users.json

(Of course, you need to substitute in your own subdomain)

PART 3: ENTER YOUR VALUES INTO API CONNECTOR

We can now enter our values into API Connector and import Zendesk API data into Google Sheets.

  1. Open up Google Sheets and click Add-ons > API Connector > Create New API Request.
  2. In the Create Request interface, enter the Request URL we just created
    zendesk-img5

  3. Under Headers, enter Authorization as your Key, and Basic {base64-encoded string} as the value:
    AuthorizationBasic {base64-encoded string}

    Replace {base64-encoded string} with the base64-encoded string you created in part 1, step 5.
    zendesk-img7

  4. Create a new tab. You can call it whatever you like, but here we'll call it 'Zendesk_Users'. While still in that tab, click 'Set' to use that tab as your data destination.
  5. Name your request. Again we'll call it 'Zendesk_Users'
  6. Click Run and a moment later you’ll see a list of your users in your Google Sheet:
    zendesk-img7

PART 4: NOTES AND EXPANSIONS

You can check the documentation for the full list of available API requests,  but if you just want to jump in, you can play around with the URLs you enter in the API URL path field. Try the following (one at a time), substituting in actual values in the spots marked by curly brackets:
https://{subdomain}.zendesk.com/api/v2/users.json
https://{subdomain}.zendesk.com/api/v2/organizations.json
https://{subdomain}.zendesk.com/api/v2/tickets.json
https://{subdomain}.zendesk.com/api/v2/ticket_audits.json
https://{subdomain}.zendesk.com/api/v2/ticket_metrics.json
https://{subdomain}.zendesk.com/api/v2/satisfaction_ratings.json
https://{subdomain}.zendesk.com/api/v2/search.json?query={search query}
https://{subdomain}.zendesk.com/api/v2/groups.json
https://{subdomain}.zendesk.com/api/v2/tags.json

IMPORTANT SECURITY NOTE

Anyone with Owner or Edit access to your Google Sheet can view all the information you've saved within API Connector, including API keys and other credentials. Treat these keys as passwords and limit access to your sheet accordingly.

Comments:0

Leave a Reply

Your email address will not be published.