Question
Can I configure a trigger to auto-comment a ticket?
Answer
No, it's not natively possible to have a trigger add a comment to a ticket. Triggers can send notifications to users containing information from the ticket, but they cannot add a comment to a ticket when they fire.
Important: Zendesk doesn't support using webhooks for Zendesk APIs as a workaround to automatically add comments to tickets. Doing so can result in race conditions and other conflicts. For more details, see the article: Can I use a trigger and a webhook to update tickets?
96 Comments
Amazing! Thanks Walter.
A couple of edits from my last post.
I realised that if you use "author_id", it adds a message to the external email that says "This comment was submitted by [uses Webhook credentials] on behalf of the author".
If you do not want this string to appear in the outgoing message, you can change "author_id" to "submitter_id".
I have also since found out that if your trigger also closes the ticket, you can create a second 'notify active webhook' action to set the ticket to closed in the same action.
Hi Ricardo Pinto,
You can automatically add comments to specific tickets with the Proactive Campaigns app. It has a new automation feature, so you can use it to send emails and add internal notes in bulk. The app adds internal notes when tickets enter the list filtered by specific criteria. It's extremely simple to use!
Lou This might seem a bit forward but.. could you check my JSON code?
We want to use a webhook to put data from a custom ticket field into a custom user field. The webhook works, and the JSON seems valid. However the custom user field is not updated. Looking at the response text in the webhook there seems to be an issue with the placeholder I've used a placeholder for the custom user field.
Here's my JSON:
{
"user": {
"id": "{{ticket.requester.id}}",
"user fields": {
"telefoonnummer_": "{{ticket.requester.custom_fields.9688774826641}}"
}
}
}
Hope the question makes sense. Thanks!
Hi Marleen de Smet,
I'm not Lou, but maybe I can help.
Try using this endpoint:
PUT
https://your_subdomain.zendesk.com/api/v2/users/{user.id}
(Note: The user.id must be an integer.)
with the following JSON body
That is assuming that 9688774826641 is the ID of your custom ticket field. If it is not, replace it with the ID of your custom ticket field.
Hi Walter,
That did the trick. Thank you!
Please sign in to leave a comment.