Hello!
So, I wanted to be able to use the webhook function to extract attachments from tickets automatically after a desired trigger action and either save them to a dedicated file destination or send the data to an application to immediately print pdf/xlxs files. I’ve been reading the documentation, but I think the “Using Webhooks” article might be outdated and would appreciate some help to make sure it works as intended.
As I understand it, the JSON code would look something like this:
{
"name": "Fetch Email Attachments",
"url": "https://yourserver.com/webhook-handler",
"http_method": "GET",
"headers": {
"Content-Type": "application/json",
"Authorization": "Basic YOUR_BASE64_ENCODED_API_KEY"
},
"payload": {
"ticket_id": "{{ticket.id}}",
"event": "{{event}}"
},
"trigger_on": g
"ticket.created",
"ticket.updated"
]
}
However, in the Trigger webhook section I don’t have an option to edit the body, so I can only assume that the website already has the function written and simplifies it for the end user. I can only add custom headers - you can view the screenshot below of a webhook I edited (API Key excluded). I’m having a bit of a hard time wrapping my head around whether the below would work as is to fetch attachments from individual tickets or not since I couldn’t seem to find the right documentation for how webhooks can identify and retrieve attachments.
Ultimately my questions are: Would the webhook I have shown in the screenshot work as intended and fetch the attachments? If not, what would be the correct way of doing this?
I would appreciate any help or input, thank you!