Question
Can I configure a trigger to auto-comment a ticket?
Answer
It's not natively possible to have a trigger add a comment to a ticket unless you have the Advanced AI add-on.
If you have the Advanced AI add-on, you can create a trigger that automatically adds a public comment or an internal note to a submitted ticket that meets certain conditions. For more information, see the article: Recipe: Adding comments and notes to tickets using triggers.
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?
108 comments
Andy Seaman
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.
2
Growthdot
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!
0
Marleen de Smet
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!
0
Walter
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.
1
Marleen de Smet
Hi Walter,
That did the trick. Thank you!
1
Brett Bowser
1
Francesca Roig
This is insane, commenting on a ticket based on a simple trigger rule should be a regular feature. It is too small to justify the AI add-on if some comments are all you need.
I'm in a spiral of insufficient features. I have automations notifying the customer of pending tickets and when they're closed. This doesn't show up in ticket comments, only events, for absolutely no good reason.
Ok, I try to work around it and find a way to leave an internal note for agents to easily know why that ticket is closed.
No possible for no good reason too, needs huge AI add-on we have no use for in our operations.
Is anything being improved in regular support business rules??
1
Rusty Mulvaney
I agree, this feature should be included with all plans. Creating trigger rules is not something that AI is needed for - it just doesn't make sense. From Zendesk's AI description
The following features are included in Zendesk Advanced AI:
What does ANY of this have to do with triggers and adding a comment to a ticket?
0
Dakotah Poitra
Does anyone happen to know the formatting to get the second line "/n" to work?
0
mfg
Dakotah Poitra
It looks like you're trying to insert a line break. I believe you would use Markdown instead. There's a few ways to try it:
https://stackoverflow.com/questions/26626256/how-to-insert-a-line-break-br-in-markdown
0
Keti
Hi!
Is there any way to enable the ticket public comment under the Web Widget Interface? (customer POV) .I initiated a Messaging ticket, Web hook works, comment is added within the ticket, but it is not displayed from the customer's point of view on the web widget.
0
Paolo
Using a trigger and webhook to update tickets is not a supported workflow. For more information, kindly refer to this article: Can I use a trigger and a webhook to update tickets?
Best,
Paolo | Technical Support Engineer | Zendesk
0
Walter
Hi Keti ,
So you are using the Messaging feature and not the legacy Web Widget right?
On the legacy Web Widget, I don't think it is possible. On the new messaging, it may be possible, but it may not be a supported workaround. Are you able to provide more details?
0
Keti
Hi Walter!
Yes, exactly. We are using the messaging channel with a simple bot flow at the moment.
The reason I am trying to make this work is to avoid using the API call and branch condition in the bot. To explain it simply:
We are dividing the end customers/organizations into different plans (using tags and fields).
For example: Plan A / B / C.
Based on these conditions, I want to provide a public answer through the bot based on the Plan.
By creating a webhook that provides a public comment to the ticket, I can use the plan conditions in a trigger to add a comment to the ticket. However, it should also be displayed on the customer messaging side.
I know this is possible using the API in the bot flow by calling the organization/user field as a value once the user contacts us, and by this using different bot answers / flows. However, this will require more time for us to develop, so I was thinking of a simpler workaround.
Thank you!
0
Walter
Hi Keti ,
Actually, I was going to suggest using the API. But it seems you have already considered it.
I wish there was a simpler workaround.
0
Nicolas Distefano
This is a basic functionality that needs to be re-added as soon as possible.
0
Matthew Toenjes
+1 To allow the use of adding Internal Notes & Public Replies via Trigger to people who don't have “Advanced AI.”
This is not an AI feature and is ridiculous that we can't post internal notes on tickets natively (even when the functionality clearly already exists for “Advanced AI” users). Often times I have to do many work arounds where internal notes are useful to the workaround. It seems as if our Zendesk environment keeps having workarounds upon workarounds due to lack of basic functionality.
Some of the things where internal notes are useful for workarounds:
0
Rolf Hayes
I just wanted to express my thanks to everyone here. We've set up our own webhook and trigger for internal comments on a ticket where we need a clear prompt for agents as a warning for a particular org.
0