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!
-
How sad is it that the ability to Export macros had to be developed by an extremely helpful USER and not by Zendesk Dev? Although this way is helpful (Thanks Vlad!), my organization uses close to 900 macros, across multiple departments, this way is extremely cumbersome and way too time consuming, especially since we add and remove macros weekly.
An Export button is ESSENTIAL and takes minimal development time!
Come on Zen Desk, do better!!! -
Hi Vlad
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!
https://<yourdomain>.zendesk.com/api/v2/groups.json
https://<yourdomain>.zendesk.com/api/v2/organizations.json
https://<yourdomain>.zendesk.com/api/v2/triggers.json
https://<yourdomain>.zendesk.com/api/v2/users.json
https://<yourdomain>.zendesk.com/api/v2/views.json
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!
P.
-
Vladan
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.
-
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?
-
Antonio
You can filter the output by group ID like this:
https://XYZ.zendesk.com/api/v2/macros.json?group_id=XXXXX
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:
-
Why are the columns in a different order between files? I've been working on writing macros for two days in Excel to do formatting and get rid of information I don't need only to discover that they won't work on every sheet because the columns are in a different order!
Here is an image of the rows copied and pasted from two different files with the different column titles highlighted. I'm only including the last few columns so as not to break the page width here. :)
-
Hey Φάνης,
You can do this by using the roles parameter in the url:https://{subdomain}.
zendesk.com/api/v2/users.json?role[]=agent
.
Hope this helps!
-
Hi everyone,
We have a free and open-source app that allows you to export all your Zendesk macros into simple text files. You don't need any scripts or knowledge about the Zendesk API.
You can then make changes to those text files (such as fine and replace) and then bulk import the configuration with a simple command.
This supports macros, triggers, views, fields, and anything in between.
You can check it out here How to export Zendesk macros and bulk import them with Salto’s free app
And here's a video as well on how to do it https://youtu.be/smiolaVsIJU
-
Works a charm - well done!
-
Hey, is there a way to upload these again after changes?
-
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!
-
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!)
-
Hey Joshua,
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.
Sub start_fillit()
On Error GoTo Ende:
Dim i As Long, tmp
Dim j As Long
For j = 1 To 7For 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
Else
Cells(i, j).Value = tmp
End If
Next i
Next j
Columns("D:D").Select
Selection.Replace What:="true", Replacement:="WAHR", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("A1").Select
Ende:
End Sub -
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?
-
Hi Lynette!
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?
-
Hi Anabela,
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.
Thanks!
-
Hi,
How i can use that files creating a sandbox? -
Hey Luis,
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.
Cheers!
Vous devez vous connecter pour laisser un commentaire.
68 Commentaires