Question
Can I use triggers to automatically CC end users?
Answer
Triggers can only be used to automatically copy agents on a ticket. There are two alternatives to copying end users on a ticket.
- Set up Shared Organizations to allow all users within an organization to view their organization’s tickets as well as comment on them. For more information, see the article: Setting up a shared organization for end-users.
- Create a webhook that notifies your external end user when your trigger conditions are met. For more information, see the article: Creating webhooks in Admin Center.
10 Comments
You can, but it's a bit of a smelly workaround.
Set up an HTTP target in the Extensions menu:
Then set a trigger to notify the target and add the JSON below:
Simples!
...but dirty.
Hey Richard,
I'm trying your work around but it doesn't ever seem to update the CC's with my user that I am trying to add.
What is the endpoint parameter you're using in the screenshot? I am assuming it's {{ticket.id}} but.. i'm not able to get it to update.
I am also trying to manually update through postman with the direct ticket ID to test the JSON - the call goes through with a 200 but no actual updates..
Though I'm wondering if they closed that gap since it's only supposed to be agents that are able to be added via automation? Any extra help you can offer would be awesome. I have a customer that needs one of their users CC'd on all their tickets. And the zendesk option of opening them up to the rest of the org doesn't work because they don't use the portal.. they only operate through email with us.
The endpoint in the extension is something like https://YOURSUBDOMAIN.zendesk.com/api/v2/tickets/{{ticket.id}}.json+?ticket[additional_collaborators]=
Thanks Heather... That doesn't seem to be working either. Still getting 200 but no updates to the ticket.
BUT -
I did get it to work with the following:
I set the HTTP target endpoint to
https://YOURSUBDOMAIN.zendesk.com/api/v2/tickets/{{ticket.id}}
the body of the trigger I used was:
This created my new ticket and automatically added the end user as a CC
Morgan McCallum
Thank you so much for circling back with that! Very cool.
Morgan McCallum
I was just reminded that HTTP is being deprecated... have to move to webhooks. Here's what to do to set something up for Auto Private Comments:
Set up the webhook at https://YOURDOMAIN.zendesk.com/admin/apps-integrations/webhooks/webhooks
endpoint
https://YOURDOMAIN.zendesk.com/api/v2/tickets/{{ticket.id}}
Set up a trigger with an Action at the bottom with Notify Webhook
PUT
The webhook test didn't go through for me, but when I set up the trigger it was good to go (?)
Happy Zendesking!
Heather Rommel
bit of a dumb question but if i use the trigger body morgan has wrote:
how would i add multiple end users using this statement
Hi William,
If you are using additional_collaborators property, you can provide an array of end user ids, their emails or objects with name and email property. The example below is going to add 3 new collaborators. You can also check the documentation: https://developer.zendesk.com/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#setting-collaborators
Hope this helps.
Cheers,
Korak
I was able to achieve (almost) the same (but for 2+ users in the cc) with the Webhook target URL:
The webhook method works well for me adding a CC to a ticket on creation, but the newly-added CC does not automatically get the first notification that a ticket has been created. I believe it's the way the triggers get processed. I had to add a tag in the same trigger as the webhook, then add a new trigger that looks for Ticket->Updated and that tag present to send the requester and CC the notification that a ticket was created. It also removes the tag.
Please sign in to leave a comment.