How to export Zendesk macros into a spreadsheet

68 Comments

  • Steve W

    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!!!

    5
  • Peter Hochstrasser

    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.

    2
  • Graeme Carmichael
    Community Moderator

    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.

    1
  • Joshua Bentley

    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?

    1
  • Graeme Carmichael
    Community Moderator

    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:

    https://XYZ.zendesk.com/api/v2/groups.json

    1
  • Joshua Bentley

    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. :)

    1
  • Eric Nelson
    Zendesk Developer Advocacy
    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!
    1
  • Pablo Gonzalez

    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

    1
  • Andrew J
    Community Moderator

    Works a charm - well done!

     

    0
  • Andrew J
    Community Moderator

    Hey, is there a way to upload these again after changes?

    0
  • Jennifer Rowe
    Zendesk Documentation Team

    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? :)

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    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.

     

    0
  • Jennifer Rowe
    Zendesk Documentation Team

    You're awesome. Thanks, Vladan!

    0
  • Jessica G.

    This is AMAZING, Vladan - thanks so much for sharing this awesome tip! 

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    Hi Peter and thanks for jumping in!
    I agree with you, I'm using this tip for all of these exports!

     

     

    0
  • Jennifer Rowe
    Zendesk Documentation Team

    Oh, that is nice. Thanks for pointing that out, Peter!

    (And hey Jess!)

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    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!

    0
  • Joshua Bentley

    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.

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    Ahhh got it!! Unfortunately, there is no way to achieve that :/

     

    0
  • Joshua Bentley

    Poop. Well thanks anyway! I'll explore a different way to do that. Thanks!

    0
  • Peter Hochstrasser

    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

    https://support.zendesk.com/hc/en-us/articles/203662346-Exporting-data-to-a-CSV-or-XML-file-Professional-and-Enterprise- 

    Zendesk offers a Report feature that allows to directly export data (as JSON, XML or CSV).

    0
  • Frank Lueck

    @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 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
    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

    0
  • Lynette

    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?

    0
  • Jessie Schutz
    Zendesk Customer Care

    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. :)

    0
  • Sarah Seiwert

    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!

    0
  • Nicole Saunders
    Zendesk Community Manager

    Sorry about that, Sarah. It should be visible now!

    0
  • Anabela Miranda

    Hi, Thanks for this information :). Can we extract information about the usage of the macros?

    0
  • Brett Bowser
    Zendesk Community Manager

    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!

    0
  • Luis Alfaro

    Hi,

    How i can use that files creating a sandbox?

    0
  • Brett Bowser
    Zendesk Community Manager

    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!

    0

Please sign in to leave a comment.

Powered by Zendesk