How to Export Zendesk Guide Data as CSV
Posted Aug 23, 2018
Here is a script that exports Zendesk Guide Article information as a CSV:
https://github.com/scotthavard92/Zendesk-Help-Center-Export-Scripts
This tool uses the Zendesk Help Center API(https://developer.zendesk.com/rest_api/docs/help_center/introduction) to pull Guide Information and populate it in a csv file. This will output values such as Article Id, Article Title, and Vote Count.
The output looks like:
Here is a nifty video overview and instructional:
Let me know if you have any questions!
1
41
41 comments
Ron de Vries
Hi Scott,
Is it also possible to extract the body of an written article? We need a .CSV file so our translation agency can make the translations into foreign languages.
Please let me know if you (or any of you) have any tips on this!
Thanks in advance,
Ron
0
Kurt Lojka
Thanks, Scott! It worked like a charm. Really appreciate your assistance.
0
Jessie Schutz
Thanks, Scott!
0
Scott Havard
Hey Kurt!
I just added the "updated_at" code in the GitHub repository.
https://github.com/scotthavard92/Zendesk-Help-Center-Export-Scripts/blob/master/Article_Information_Export/Zendesk_Guide_Article_Export.py
In short I added the "updated_at" as a string type. Hopefully that will do it for you! I had trouble storing it as a different data type.
It looks like the YouTube commenter was able to do it! It might be worth asking how Apathia did it in case you need a different data type.
Keep me posted!
0
Kurt Lojka
Hi Scott,
great work on the script and the video. Super helpful! I was just curious how I can add the timestamp (updated_at) to the script and kept getting one error after another. I would appreciate some pointers on how to achieve this as adding this
didn't work for me.
It also looks like somebody else had the same question on the YT video.
Thanks for any input on this.
0
Mary Paez
Yes. The code ran fine and produced the draft column. Then I added a new column to represent the Author Name. In Agent UI, I exported the list of Agent ids and names. Then, pasted into the spreadsheet (as a table). I used the Vlookup function in Excel to add the correct Author name next to the article they authored. Then, when done I added the ss to Google sheets so Agents can run their own reports at the end of month (I will update once per month)
0
Scott Havard
This is great Mary!
I am so happy to see that you got it to work, and also thank you for sharing information about the "The Unarchiver".
Did your code work? (Nice work on adding stuff!)
One comment is that you may want to change int(draft) to bool(draft). If it runs either way, then it is probably fine either way.
I updated the code in the repository to add a "draft" row as well.
0
Mary Paez
Hi We figured it out. RUN SUCCESSFULLY!!!! When a file is downloaded to Mac, it is changed to a different format. So, we had to install "The Unarchiver" from the Mac App Store to open the zip file (rar). I had to also use IDLE to open/edit the script.
I added in the draft field to the output
I have a list of the agent ids (we have over 100+) and their names so I can map within the spreadsheet. Once I extract the Agent Ids and name mapping, I can create an Excel formula to add a new column with the Agent name to each row. Then, I can filter by that agent to get their individual report.
Thank you so much, Scott. This is very, very helpful.
0
Scott Havard
Hey Mary!
Thank you for the kind words.
I am glad to hear that you were able to successfully get the requests library using pip. This suggests that python is installed correctly, and requests is now installed on your machine.
I want to give you a big thanks for providing feedback so quickly, I imagine your issue is one that will arise on many occasions.
To address your questions:
Best,
Scott
0
Mary Paez
Scott,
This is great and super useful!
I ran pip3 install requests. That seemed to work ok.
Also, I wanted to check my subdomain name. How can I do that?
When I run the script I get this error message:
-----------------------------
File "Zendesk_Guide_Article_Export.py", line 1
SyntaxError: Non-ASCII character '\xff' in file Zendesk_Guide_Article_Export.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
mary-paez-mbp
-------------------------
We need a way to do the following:
As I am not a programmer, do you have ideas on how I can do this?
I just downloaded Python and am going thru the documentation.
Thank you
0
Sign in to leave a comment.