Export all tickets to a Google Sheet using the API

I would like to use the Freshdesk API to export all, or some of the ticket fields to a Google sheet and create customized reports. 

Any hint on how I can do this?

This topic has been closed for comments

11 replies

I have exactly the same question. Want to automatise the "export csv" for reimporting on google sheets. 

Any help?


Get the list of all tickets by using the appropriate entry point as indicated here, you can use some filters to get some of the tickets. You can use my source code and adapt it to make it work with the version 2 of the API. You have to call this code several times as the results are paginated, each page contains at most 30 tickets (default value, can be modified).

Then, write '\ufeff' at the very beginning of your CSV file so that Microsoft Excel understands that your sheet uses UTF-8. Maybe this step is optional for Google Sheets.

After that, loop on each ticket, take care of the special characters (especially new line characters), write each field value of a ticket in this file separated by commas and write a new line for each ticket.

Another option is Flatly which lets you auto-export Freshdesk data (full objects) to Google Sheets or other cloud drives.  

Disclosure:  I work at Flatly.

Note that Flatly is neither open source nor free of charge (except for a 14-day trial period or by using Slemma).

If somebody needs some help, I can provide a more detailed example using the version 2 of the API.

Whenever I resolve a ticket in freshdesk I need the ticket ID and some fields update in a specific Google spreadsheets (online sheet). Is there any Api to get this??

@Julien I would like to know more about the Authentication part, for using these API's. If you can point to some info on it. I would be using Spring (Java) for using freshdesk API's.

I think this is the way to go:


Thanks! But I was wondering about how to use the API key (I guess using basic auth, I'll have to fetch all API data). Also, the JSON response is not a valid response because none of the key are quoted in -> ". Any idea about this ? (I checked JSON's validity)

Have you looked at my source code above? Your last problem might be a bug but it doesn't prevent me from getting the keys and the values. Why not filling a bug report?

I got it done. Thanks!

Need to worry about getting incremental tickets details now. Since every request gives all the tickets.

You need to use the filters. I remind that the results are paginated (see the "per_page" and "page" filters) and you only see the tickets created within the past 30 days by default except if you use the "updated_since" filter. You might have to use the "include" filter to get some additional fields. Of course, you'll have to make some requests to get some information about the requesters and responders as the request on the tickets returns the requester id and the responder id.