Question
Is it possible to download all ticket attachments in Zendesk Support?
Answer
Zendesk Support does not yet have functionality built in to download or export all or only attachments natively. However, this is possible using the Zendesk API for both the individual ticket and for all tickets.
- For an individual ticket:
Attachment URLs can be found within:
https://subdomain.zendesk.com/api/v2/tickets/TICKET_ID/comments.json
Each comment will have an attachments array attribute, which will contain links to any attachment included in that comment. To get the file associated with it, you'd need to download the file linked at the content_url attribute. - For all tickets:
Accounts with access to exports should be able to perform a JSON export of tickets, which will contain links to the various attachments as: https://subdomain.zendesk.com/api/v2/attachments/ATTACHMENT_ID.json
In order to download the attachments associated with each link, you'll need to perform a GET request to that endpoint, and download the file linked at the aforementioned content_url attribute.
Note: The same attachment links will show up in the JSON export associated with user-photos. If that user has been deleted or subsequently changed their photo, those links will fail to return files.
5 Comments
Is there a way for Agents to download multiple attachments without clicking on each link? Or at least drag and drop them to their desktop? We often have tickets with 10-20 attachments and the change from receiving them via email, where the agent is able to download all files with one click, to having to select each one individually within the ticket, is feeling extremely cumbersome to our agents.
Hey Deirdre -
The API call described above is the best way to download multiple attachments, unfortunately at the moment the functionality to download all with one click has not yet been developed. I'm sorry I don't have an easier answer for you at the moment.
There is an app that someone has built for downloading all attachments. I've been testing it for our own use and it works well.
https://www.zendesk.com/apps/support/download-all-attachments/?source=app_directory
Thanks, Paull! Glad to hear someone has built a solution that works.
Would be nice if the API had a "list all attachments" function so we don't have to load all comments in order to load all attachments
Please sign in to leave a comment.