Performing ticket actions based on who is CC'd


Note: As per this article Zendesk targets have been discontinued and replaced with webhooks. For information how webhooks are setup instead of targets see here.


It is possible to perform ticket actions based on who is CC'd on a ticket. For example, every time the accounting department is CC'd you could automatically do something, like popping up a notification or applying a specific task list. 


Performing a ticket action based on who is CC'd can be done with the following 3 steps: 

1. Create a target to update the ticket.

2. Create a trigger that converts the CCs into tags.

3. Create a trigger that performs actions based on the tag.


Step 1

To create the target in Zendesk, click on the cog in the left bar, then on Extensions and then on add target like this: 


Then click to create an HTTP target like this:



Give the HTTP target a name and in the URL section add the following...

...Where yourhelpdesk is the URL name used for your helpdesk. 

Then, set the Method to PUT, the content type to JSON, put in your Zendesk user credentials and click to create the approval like this: 



Step 2

To create a trigger to convert the CC addresses to tags click on the cog on the left, go to Triggers and click add trigger like this:



Then give your trigger a name and set the conditions for when you want it to fire like this: 


Under the Actions section, set a rule to Notify target and select the target you created in step 1. 

Then in the JSON body section. copy and paste in the following code:


"tickets": [
"id": "{{}}",
"additional_tags": [{% for cc in ticket.ccs %}"{{ }}"{% if forloop.last == false %},{% endif %}{% endfor %}]

Finally, click to save the trigger at the bottom.

The Actions section should look something like this:


Step 3

To take action on the support tickets with a specific tag, once again you will need to click on the cog on the left, go to Triggers and click add trigger like this:



Then give the trigger a name as to what the action will be. 


Next set a rule to look for the tag that matches the email address in question. 


Note: Tags can not include @ symbols, so when you write your tag, ensure that it matches the email address precisely with the exception that the @ symbol should be removed. Ie. instead of setting the rule to look for the tag, set it to look for the tag 


Next, in the Actions section, ensure that you set a rule to remove the tag the conditions are checking for. This will ensure that the trigger does not 'loop' and continue firing 



Lastly, you can add further actions to the trigger to ensure that what you want to happen, happens. In the case below, it has been set to automatically apply a task list to the ticket while also sending an emailing notification to Fin Raziel informing her of the ticket:


After creating the trigger, you can test this process by sending in a ticket where the relevant CC address has been added. 


Was this article helpful?
2 out of 2 found this helpful



  • Hi Peter,

    I found this article very helpful. I wish zendesk would be this detailed in their help center.

    One part of this had me blocked for a minute and I could not figure it out until I really thought about it. Please let me know if I am missing something. In a SET trigger above the trigger that is created to add the CC's an action must take place to add the "add_ccs" tag in order for the trigger to run.

  • Hi Lee, Yes that is correct in that in step 2, the part that describes adding the rule "Tags" - "Contains at least one of the following" - "add_css" is somewhat of a placeholder for whatever conditions you want the trigger to fire on. You can change this to match whatever rules you actually need. For example, instead, you could create a checkbox field and set your rule to fire based on that...  or if you wanted this trigger to fire on ALL tickets that get created you could remove the rule entirely. It really comes down to your requirements as to when you want the CC's to be converted to tags. 


Please sign in to leave a comment.