Trigger to detect attachments in a ticket? | Community
Skip to main content

Trigger to detect attachments in a ticket?

  • May 13, 2021
  • 2 replies
  • 0 views

Vivian16

Hi! I'm using Zendesk Email and would like to set something up that will detect tickets with or without an attachment. Tickets with attachments will automatically be assigned to someone and vice versa for the other. 

There's no condition that can currently do this, does anyone have any frameworks or advice on how to achieve this? 

2 replies

mccabe.tonna

Vivian,

This is intriguing. I did a quick check on a new ticket and the attachment "payload" seems to be on the comments endpoint.

I suspect using an HTTP target to check every-time a ticket is created (or updated), the comment is public.

Then using liquid-markup, you could check the attachments array in the payload. if > 0 , there is an attachment, and you can add a tag or whatever you'd like (in the trigger)

yourzendesksite.zendesk.com/api/v2/tickets/ID/comments

"attachments":[],

 

Let me know if this makes any sense 


Vivian16
  • Author
  • May 14, 2021

Hi McCabe,

Thank you for getting back to me! For creating a HTTP target, do you need to enable the basic authentication? 

Also for setting up the the trigger, I'd like to tag those tickets. How would I be able to achieve that? Where do I input the code below? 

"attachments":[],