Question
How do I export all my account macros into a file?
Answer
A prebuilt feature to retrieve a list of all your macros isn't available. However, you can use the Application Programming Interface (API) endpoint List Macros to retrieve all shared and personal macros available to the current user. Admins can retrieve any macro on the account regardless of the creator.
Method 1: Browser method (quick view)
This is the fastest way to view your macro data without the need to write code.
Step 1: Sign in to your account:
IMPORTANT: This method uses your active session cookie for authentication. If you aren't signed in, you receive a 401 Unauthorized error.
- Open a browser tab and sign in to your account
- Verify you're signed in and check that you can see your dashboard
Step 2: Access the API URL:
- In a new tab within the same browser, paste the relevant URL snippet below
- To retrieve personal and active macros:
yoursubdomain.zendesk.com/api/v2/macros.json?access=personal&active=true - To retrieve all macros on the account:
yoursubdomain.zendesk.com/api/v2/macros.json?access=account
- To retrieve personal and active macros:
- Replace yoursubdomain with your actual subdomain
- Press Enter
Understand the results
- Success: You see a JavaScript Object Notation (JSON) list of macros
- 401 Unauthorized: You aren't signed in to your account in this browser
- 403 Forbidden: You don't have the required permissions to view these macros
- Limitations: This browser method returns a maximum of 100 macros. For accounts with more data, you must use pagination parameters, for example,
&page=2.
Method 2: Third-party export
For a more user-friendly format, Community Moderator Vladan Jovic created a tutorial on how to export macros into a spreadsheet that uses the API mentioned above.