How to export Zendesk macros into a spreadsheet
Regarding to this post I decide to make this short tutorial.
1. you need to be logedin as Admin or Agent of your ZD account.
2. open this link XYZ.zendesk.com/api/v2/macros.json?per_page=99 (but change XYZ to your zendesk account name)
2a. If you have more than 100 macros, you should export one more JSON file cause it's up to 100 macros per export. Second file is on this url https://XYZ.zendesk.com/api/v2/macros.json?per_page=99&page=2 (replace XYZ to your ZD name)
3. When json file is loaded, save it on your computer (CTRL+S or CMD+S)
4. Open site: https://json-csv.com/
5. Upload your JSON file
6. Wait a little
7. Click on Download button.
Ta-Da, you have your macros exported in CSV file format.
Hope this helps!
Works a charm - well done!
Hey, is there a way to upload these again after changes?
Thanks for posting.
Just a reminder that the extract will display up to 100 macros at a time. If you have more than 100 macros, you need a further extract to display the next page.
I know a lot of users who will love this tip! Thanks for sharing it, Vladan!
Maybe we should add a note that it's100 macros per export.
Thanks for pointing that out, Graeme! (How many exports did you have to do? :)
Thanks Graeme and Jennifer, post updated!
Hey Andrew, regarding to ZD API doc, there should be a way to do that, but it's not easy to do as pulling (backup) macros. Will try to make tutorial for update macros next time.
You're awesome. Thanks, Vladan!
This is AMAZING, Vladan - thanks so much for sharing this awesome tip!
Great tip, thanks for sharing - but keep in mind that it has even more potential:
This recipe works also for other object classes - triggers, users, views, ... - your way to back up large parts of your customizations in Zendesk!
Replace <yourdomain> with your Zendesk Account Subdomain.
Some objects include sub-objects which may or may not be listed completely, so you will have to check if the list really is complete.
I do save things as .json files instead of as a CSV. The json has greater potential when it comes to restoring lost/deleted objects, the CSV is better for lookups as it is definitely a person format, not a machine format.
Hope this helps!
Hi Peter and thanks for jumping in!
I agree with you, I'm using this tip for all of these exports!
Oh, that is nice. Thanks for pointing that out, Peter!
(And hey Jess!)
This is awesome! It's going to help us a lot. I'm working on creating an Excel macro to clean up the file so we can easily review just the comments to make sure they're up to date, but it's proving difficult.
Is there a way to change the export so that the rows following a row with the macro title, ID, and Active are filled with the same title, ID, and active? I want to be able to export the file then create an Excel macro to clean up the document so only the comment values are displayed. We're going to use this to keep our macros up to date. Trying to automate an Excel macro as much as possible is tough when you can't tell which line item goes with which macro.
Here are a couple pictures to explain:
1) What the rows look like now
2) What I'd like to have happen:
This way I can then go to Column i and filter out anything that doesn't contain the word "value" and delete it to make it easier to find and review just comments.
Does that make sense?
I'm very sorry for delayed response! I'm very glad that you found this tip as useful! Unluckily, there is no way to filter out unwanted data from the json file, but you can eaisly do that in your spreadsheet, if that was your question ;) .
Feel free to ask if I can help something more! ;) Cheers!
Hi, Vladan - no worries. No, my question wasn't about filtering - that part I'm going to do in Excel. What I'm wondering if there's any way for the .json to be updated to add the macro title to all rows related to it. See my screenshot for #2 in my previous post for what it might look like.
Ahhh got it!! Unfortunately, there is no way to achieve that :/
Poop. Well thanks anyway! I'll explore a different way to do that. Thanks!
Linking related information: If you are on a professional or enterprise plan, and your desire is to extract a few metrics for ticket resolution simply and quickly, you might want to look at
Zendesk offers a Report feature that allows to directly export data (as JSON, XML or CSV).
@Joshua Bentley: it is possible to have the desired result you requested - a VB Script can do the magic for you.
On Error GoTo Ende:
Dim i As Long, tmp
Dim j As Long
For j = 1 To 7
For i = 1 To IIf(IsEmpty(Cells(Rows.Count, 7)), _
Cells(Rows.Count, 7).End(xlUp).Row, Rows.Count)
If Not IsEmpty(Cells(i, j)) Then
tmp = Cells(i, j).Value
Cells(i, j).Value = tmp
Selection.Replace What:="true", Replacement:="WAHR", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
Our company is looking at moving from the 'hub and spoke' model to 'brands' and need to export our macros and FAQs, then reimport once the move has been made. I see how to export, but how do we import back into Zendesk?
I'd recommend taking a look at this article: Switching from Hub and Spoke to Multibrand. It goes over the options available for migrating from Hub and Spoke to Multi-Brand and should answer most of your questions. :)
Hi there, I can't seem to access the "this post" link that's referenced in the article. I've included it here: https://support.zendesk.com/hc/en-us/community/posts/203409196-can-I-export-macros?page=1
Just curious to read the referenced post. Thanks!
Sorry about that, Sarah. It should be visible now!
Hi, Thanks for this information :). Can we extract information about the usage of the macros?
Can you clarify what information about macros you'd like to export just so we're all on the same page? Any additional information you can provide is greatly appreciated.
How i can use that files creating a sandbox?
You'd need to create a script and use our API to create these macros into your Sandbox account. There wouldn't be a way to import this file natively within the agent interface unfortunately.
Hello we have 1300 macros that are assigned to several groups, so the JSON in our case has 13 pages. Is there a way to display only the macros that are assigned to a specific group?
You can filter the output by group ID like this:
Where XXXXX is the group ID number of the group to filter. It is a little tricky to find that number. I suggest making a GoodData report and filtering by group name with the group ID as the output. Or you can use the API:
Thank you Greame that is awesome, I was able to quickly find the group ID by looking in People > Groups > Copy Link address over the group name.
Are there other filters we can do with the URL? Imagine that together with filtering the group, I want only to display the title of the macro, the comment text value, and the value of a specific custom field and nothing else.
The use case is to export all macros in a language, send it to a translator in an excel format that is easy to read and has only the comment of the macros, which is the real part to translate.
Since the volume of macros is quite high and the order of the different actions is not exactly the same, when I export to CSV I need to do a lot a clean up with the CSV. Instead if I was able to export just :
- macro title
- macro comment value
- value of a custom field
That would save me a lot of time instead of cleaning more than 10K of macros.
There a few parameters available here.
Unfortunately, you cannot select the columns in your output. You will always have the full macro definition returned by the API. So it sounds like you will have to a little clean up to extract the columns you are interested in using this method.
Just in case it helps, dynamic content is the recommended way of dealing with multiple languages and is available on the professional and enterprise plans.
Hope you get on ok.
we have lots of macros, and we want to get data based on actions status by json , how do we do that?
Please sign in to leave a comment.