Creating a HTML export of a ticket via API calls

Infos:

  • Used Zammad version: 5.2.3
  • Used Zammad installation type: docker-compose
  • Operating system: Debian
  • Browser + version: Chrome

Goal

For a customer I should set up some workflow to “export” closed tickets in pdf format, to push them into a company document management system. As far as I researched in the docs and here there is no simple way to create a pdf of a ticket’s overview (yes, “print as pdf” might work when done manually, we want that automated).

So I started working with API-calls and already am able to pull the ticket-content, the articles and the attachments via HTTP requests, getting JSON objects. Great, that’s already good.

What I don’t know yet: I now need to “assemble” these parts into a HTML page (first step before converting into pdf): can I look up how to do that in Zammad’s code base? I am not a professional coder so I wasn’t too successful so far looking at the Github repository.

I don’t have to mimic the Zammad GUI in detail, but a HTML “template” would be nice to have.
I am trying my workflow in n8n, so it’s also possible to use some Javascript code in some steps, if helpful.

On the other hand there might be an easier solution I don’t know yet, I’d appreciate any tips here.

I’m closing this as you’ve posted your question more than once e.g. here How to get the image file of a ticket article attachment via Zammad API - #3 by sgw .