Import Freshdesk Data to Google Sheets

In this article we'll be connecting to the Freshdesk API from Google Sheets, using the API Connector add-on for Sheets.

Freshdesk is a cloud-based customer support platform with a rich collection of API endpoints that allow you to easily collect data from just about anywhere within your customer support pipeline. So let's jump in and see what we can fetch!


Before You Begin

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

Part 1: Get your Freshdesk API Key

  1. Log in to Freshdesk to gain access to your API key. Once logged in, navigate to the main dashboard, click on your profile pic in the top right corner and click Profile Settings.
  2. Your API key will be on the right side, ready to go! Copy that down as we'll need it shortly.
  3. One last step. Freshdesk uses Basic Authentication, so you need to encode your API key. To encode your credentials, type your API key into this form, using the format APIkey:X (your API key, a colon, and then the capital letter X). 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.


Part 2: Pull Data from the Freshdesk API into Sheets

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

  1. In Sheets, open API Connector and create a new request (Extensions > API Connector > Open > Create request)
  2. Select Freshdesk from the drop-down list of applications
  3. Under Authorization, enter your encoded API key with the word Basic in front.
  4. Choose an endpoint, for example /tickets
  5. Enter your Freshdesk domain in the path parameters section.
  6. Choose a destination sheet, name your request, and hit Run to see the response data in your sheet.

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. Here's a sample request setup. Substitute in your own sitename where it says site, and your own encoded API key where it says your_encoded_API_key.

  • ApplicationCustom
  • MethodGET
  • Request URL
  • Headers
    • Authorization: Basic your_encoded_API_key

Part 4: Handle Pagination

By default, Freshdesk limits the number of records returned at one time to 30, as described here.freshdesk-img7

You can loop through pages automatically with pagination handling. Freshdesk’s documentation shows that next page URLs are provided in a field called “Link”, so you would loop through your records like this:

  • Pagination: next page URL
  • Next page path: Link
  • Run until: choose when to stop fetching data

Part 5: API Documentation

Official API documentation:

14 thoughts on “Import Freshdesk Data to Google Sheets”

  1. Thanks Ana for this great work.
    As I connected to the Freshdesk API I needed to make some changes to the headers Authorization value. It worked using only the API key with a ":" at the end (no API nor x) and encode this string. Hope this saves some time for somebody using Freshdesk and Mixed Analytics.
    Best regards

    • You don't actually need to be logged in to use their API, so they're providing a rather misleading error message. It just means you have entered invalid credentials. Please doublecheck that you've encoded your token and there aren't any typos.

    • Based on their documentation, that's not possible.

      The maximum number of objects that can be retrieved per page is 100. Invalid values and values greater than 100 will result in an error.

      However the pagination section of this article shows how you can loop through to retrieve more than 100 values.

  2. Hi,

    I am trying to fetch freshdesk tickets, however, showing a 401 error that credentials invalid. Freshdesk is logged in but with company's common Microsoft account, however, I am using my gmail account.
    How to solve this?

    We received an error from (401)
    {"code":"invalid_credentials","message":"You have to be logged in to perform this action."}

    • You don't actually have to be logged in to Freshdesk to use their API, so I think this is just a poor error message. The real problem is shown in the "code" value, which shows you have entered invalid credentials. Please doublecheck the token you've entered in the Headers section, and make sure you've correctly encoded it as shown here.

  3. We use Freshservice and are successfully using the Mixed Analytics API Connector for Google Sheets. However, when we do a scheduled daily/weekly import (OVERWRITE) the Column Headers reorder (same names but the column numbers are different). Is there a way to ensure the Google Sheets Column headers stay in the same order after each import?

  4. In creating a custom API call to Freshdesk, the header key should be:
    Authorization: Basic [your_encoded_API_key]

    I followed the instructions and specified key "Authentication" and spent a long time troubleshooting why it didn't work 🙁

    • Sorry, Marten!! I think it worked as written at one point, but you're correct it's not the case now. I've updated the article and added a 2 month free API Connector subscription to your account as a little apology for wasting your time.

      • Thank you, I appreciate it. Then I should be able to test the scheduling and pagination features as well, in evaluating your project. Right?

Leave a Reply to Ana Cancel reply

Jump To