Tool to backup/restore triggers, automations, and macros

10 댓글

  • Dave Dyson

    Thanks for posting this tip, Julio!

    1
  • Alejandro Colon

    This looks incredibly useful. I am trying it out and ran across a few things I think you should add. I will submit a pr on github. The backup seems to work great so far.

    The only actual issue I ran into was using the RESTORE. But, that was my own negligence.

    Great tip!

    1
  • Julio Fasolato

    Hi @...!

    I'll look into this and I'll get back to you about this issue on GitHub. Thanks a lot for the feedback!

    1
  • Amie Brennan

    I use this add-on to Google Sheets called API Connector:

    https://mixedanalytics.com/api-connector/

    Literally allows me to pull all the data from Zendesk into a nice spreadsheet. Click one button and the API call will run and update the data. Very very handy!

    1
  • Kulin Joshi

    const response = JSON.parse(UrlFetchApp.fetch(`https://${subDomain}.zendesk.com/api/v2/dynamic_content/${token}.json`, options))

     

    Which token needs to be added here?

    0
  • Julio Fasolato

    Kulin Joshi You don't need to add any token there. In the WRITEDATA() function, you can see that the first thing to be declared/initialized is an array with 4 strings (triggersautomationsmacros,  items).

    Later, there's a for loop that iterates over this array, and for each iteration, each of these items will be passed as an argument when we call the GETBACKUP() function, and this "token" will complete the URL to make the HTTP request.

    Basically, it's what is going to allow you to make the request to the different API endpoints that are being used here to get the triggersautomationsmacros, and dynamic content items.

    Hope this helps!

    0
  • Kulin Joshi
    Message details
    Exception: Request failed for https://tomtomhelp1570114826.zendesk.com returned code 401. Truncated server response: {"error":"Couldn't authenticate you"} (use muteHttpExceptions option to examine full response)
     
    I get above error
    0
  • Julio Fasolato

    Kulin Joshi Check your authentication method. If your Zendesk is using 2FA, you won't be able to authenticate just with your email and password. In this case, you would need to authenticate with an API key.

    This happened to me and it's the reason the support guy at Zendesk told me.

    0
  • Moaz Magdy

    Hey Julio Fasolato Thank you for posting this. I just tried this tool and it works perfectly.
    However, I ran into an issue where the maximum number of backed up items is 100 per category.

    Is there a modification that needs to be made if I want to backup more than 1000 triggers and macros in Zendesk?

    1
  • Julio Fasolato

    Hello there @Moaz Magdy! Sorry for the delay. I haven’t taken a look at this in a while, but if I remember correctly, there’s a limit of 100 requests per minute or something like that. I can recall reading something about that at some point.

    I’ll leave a link for you to take a deeper look: https://developer.zendesk.com/api-reference/introduction/rate-limits/

    Or, if you cannot find the info, I really encourage you to file a ticket for Zendesk support. Back in the day, the were super helpful regarding these matters!

    Sorry that I can’t help further on this, but if there’s anything else regarding this script in which I can help you, let me know and I’ll try to respond as quick as I can.

    Cheers mate!

    1

댓글을 남기려면 로그인하세요.

Zendesk 제공