Recent searches
No recent searches
Push notifications from Zendesk to Slack
Posted May 09, 2019
The official Zendesk-Slack integration is very powerful, offering out-of-the-box two-way communication in a stylish way, but sometimes you just want a simple notification setup.
I hope this guide is helpful in showing the flexibility possible with Zendesk triggers and Slack.
Create a Slack app (in Slack)
[Alternatively, you could just create an incoming WebHook in Slack]
Make sure you're logged into Slack from your browser and proceed to:
https://api.slack.com/apps/new
Give the app a name that is appropriate, I've chosen Zendesk notifier for this example, and also select which Slack Workspace you want the notifications on (if you have multiple).
Push the Create app button.
On the next screen, under Add features and functionality, select Incoming Webhooks.
Switch on the incoming webhook and click the Add new webhook to Workspace link
Next up select the Slack channel you want the app to post messages to and Authorize.
Copy the webhook URL, we need that for the next step in Zendesk.
Create a Webhook (in Zendesk)
[@... - thanks for updating this section!]
Navigate to the Webooks page: Admin Center > Apps and Integrations > Webhooks, and click Actions > Create Webhook.
In the Create Webhook screen, enter:
- A Name which represents the webhook/channel
- The Endpoint URL which is your Slack Webhook URL from earlier
- Set Request method to POST
Press Create and then press Complete setup on the following screen.
Now we have created a link from Zendesk to Slack, next we need to create the trigger that will push messages through this connection.
Create a Trigger (in Zendesk)
Navigate to the Triggers page: Admin > Triggers and push the Add trigger button.
Set the conditions for when you want Zendesk to push notifications to Slack
You have a lot of options here to precisely specify what kind of updates you want notifications for, a few examples:
- A new ticket is created
- A new ticket is created for a particular channel (e.g. reviews from Trustpilot or Play Store)
- A ticket with elevated priority is updated by the requester
- A ticket is updated with a satisfaction rating (Steven Yan has a great post outlining this use case)
Below I set the trigger to fire when a ticket with a priority above Normal is created.
You could have multiple use cases in mind, and create a separate trigger for each of them if you would like.
Set the trigger action to push a message to the Slack target
Again you have a lot of options here, what content you want to include in the notification and you also have a number of styling options as well.
Below is the JSON used in the above example - be sure to update the YOUR-DOMAIN part to your specific Zendesk subdomain.
{
"text": "<!channel> \n {{ticket.assignee.custom_fields.slack_member_id}} \n A ticket has been updated to *{{ticket.status}}* \n *Requester* {{ticket.requester.name}} \n *Organization*: {{ticket.requester.organization.name}}",
"attachments": [{
"color": "#E34F32",
"fallback": "See review here: {{ticket.url}}",
"actions": [{
"type": "button",
"text": "Go to ticket in Zendesk",
"url": "http://example.zendesk.com/agent/tickets/{{ticket.id}}",
"style": "primary"
}]
}]
}
In the example here, I include an @channel mention, followed by a four-paragraph message stating that there is a ticket has been updated to its current status, there is a button linking to the ticket in Zendesk (for easy access), and the requester name and organization name are also included. There is also a timestamp from the ticket update included.
Here is an example of what it looks like in Slack:
You can pull all kinds of user and ticket data into your message, see the Zendesk Support Placeholder Reference for all available options.
The above example is very basic in terms of style, you may want to add some bling to your messages, and for that Slack has its own message builder. You can add links, buttons, fields, images, and colors to your messages.
💡 Check out the comment section below for more use cases.
💡 You can use placeholders to insert ticket or user content into the message.
💡 You can use Liquid markup to modify placeholder output, for example, have a timestamp converted to something more readable, or have a nested field output only the last element.
8
58 comments
Jahn
Thanks Jacob. I was able to make it work! Woohooo! This article is very helpful.
1
Eric Sieker
Great article! One question though - I've setup a slack webhook, and created a trigger so that whenever a specific user is assigned a ticket they receive a slack notification. This works great, however, I am also seeing that notification on their individual channel, and being notified when it comes through on slack. No one else in my organization is seeing this so I can only assume that the webhook/trigger is setup in a way that alerts the creator of the trigger (me) as well as the intended recipient.
I don't see anything in the setup of the webhook or trigger that accounts for this behavior. Is it possible to alert only the intended recipient?
1
Shane Caplice
Hey Jacob the Moderator
I am looking to piggy back off the setup that Victor Hrsit was asking about in the comments.
I am struggling with the slack_user_id custom field setup
I want to be able to @tag the ticket assingee through the webhook in the slack channel.
I can get the @here & @channel webhook to fire correctly, but struggling with the agent setup.
Can you explain the exact setup for Zendesk>Custom fields? Do I require a custom field per agent with their slack ID? I'm currently testing this is the Sandbox setup, which is not integrated with Slack - but I imagine this does not matter.
Thanks in advance
0
Jacob the Moderator
Hey Shane.
In one of the earlier comments I gave an example of how this could work using a user text field and a placeholder.
https://support.zendesk.com/hc/en-us/community/posts/4409515187866/comments/4409515954970
And I think Viktor confirmed a solution just below. Let me know if you need more details.
0
Jacob the Moderator
Hey Eric Sieker.
Did you work out your unexpected notification conundrum?
I'm not sure I follow who is getting the unexpected notifications and where.
0
Max
Really helpful article, however I'm asking myself how I can specify in the JSON which channel I wanna send my notification to ? I would have to send the notification to the slack tech_channel or sales_channel. Thank you for your help
1
Jacob the Moderator
Hey Max,
Glad you found it helpful!
A slack webhook is specific to a single channel, so you may need to create multiple to notify different channels.
I found this article that has more details on slack webhooks, hope you find it helpful.
https://api.slack.com/messaging/webhooks#create_a_webhook
0
Max
Hi there, very useful post.. although I am trying to set up an automation and I am struggling :
- one agent starts a side conversation with a special slack channel (tech)
- ticket status changes to on-hold
- automation firing a notification in the same slack channel if no answer from Slack channel after 24h
Is that possible ?
Thank you :)
0
Jacob the Moderator
Hey Max - thanks, I'm glad you find it useful!
That's an interesting use case!
I must admit that I've never used Slack with Side Conversations, so there may be possibilities I'm unaware of. If you have a way to identify which Slack Channel you've reached out to, you may be able to create a per Slack channel automation that will send a message based on "Hours since On-hold > 23 hrs (calendar)".
This could get a lot more complex if you have multiple side conversations on the same ticket.
I hope that's helpful, let me know if you have some specific challenges.
0
John Wells
Is there a way to use the Field 'Value' instead of the Field 'Tag' when sending a message to slack?
Using the tag isn't very readable.
When I go into custom fields for tickets, users, org, etc. there's two columns "Value" and "Tag"
I am currently using items such as Value:{{ticket.ticket_field_1231232113}} but that displays the tag not the value.
1
PJ
Great question! If you are referring to custom dropdown field values, you may try the below placeholder as stated in the article Using placeholders for custom fields.
"{{ticket.ticket_field_option_title_<field ID number>}}"
Best,
PJ
0
Keti
Is it possible to send a notification as a direct message to each user on Slack?
We would like to have an "individual" (direct message) notification for each agent on Slack, once a Zendesk Ticket is assigned to them.
Example:
Zendesk Ticket received to Group A
Someone from Group A assigns the ticket to Agent A
Agent A gets a notification through Slack
Basically same logic as Notify by Email:
Notify by > Email - Ticket > (assignee)
Thank you!
0
Max
Hello Keti
It is not possible natively, but as a workaround you can tag the assignee in a specific channel. if you're interested you can try using a flow with trigger + side conversation + tagging the Slack userid.
1. First you have to get the Slack userid of your agents. You can export (as admin) the members of your Slack workspace and then get their id (it looks like this : U04WTP4UM7T).
2. To avoid multiple triggers (one per agent) you can store them for each agent as a User Field (Slack id).
3. Set up a trigger (or several triggers, one per agent if few agents) calling/notifying your Slack integration (for example as Side Conversation) and add to the body your Slack ID (as it is, or through the user field you've created).
example : This ticket has been assigned to <@U04WTP4UM7T>
As a result, indeed there's no direct message firing, but the assignee will be tagged and have a notification on Slack.
Hope it helps,
0
Dave Dyson (gmail)
Thanks Jacob the Moderator for helping me to get this working – and just for future reference, here's how you'd get a clickable hyperlink of the ticket Subject that takes you to the ticket:
<https://yoursubdomain.zendesk.com/agent/tickets/{{ticket.id}}|{{ticket.title}}>
1
Vamshi ravikanti
Hello Everyone,
Can someone assist me in setting up Slack notifications for whenever we post something on our Zendesk Community?
0
Jacob the Moderator
Hi Vamshi ravikanti 👋
I did a post on that some years back, but I don't think it exists anymore.
The good news is that there is more native Zendesk support for such a flow now than then.
Instead of using a trigger to kick off a notification based on a certain ticket event, you can now use a webhook to listen to something like the Community Post Created event, and have it send a notification like the one mentioned in this post.

I'm not sure if there are any placeholders available for the notification, you may need to keep it generic, like “New Post created” and link to a saved search or some other location where the post can be reviewed (I know very little of the Gather product :)).
I haven't tried this setup myself, but let me know if you have questions and I'll do my best to answer them.
0
Vamshi ravikanti
Hi Jacob the Moderator
Thanks for your response, Yeah i saw the Zendesk native feature but the problem is how to send a notification to slack from here.
0
Jacob the Moderator
Hi Vamshi ravikanti
OK, I see I may have jumped the gun a bit on calling out the Zendesk Event Webhook as a solution for this.
I just noticed that there doesn't appear a way (from Zendesk) to modify the payload sent from this kind of webhook. You would need some kind of middleware like for example Zapier or MS Power Automate to take the payload and parse it for the information you would want to show in a Slack notification and send it to Slack.
If you're on a paid Slack account, you may have access to email addresses per channel - a low-tech solution using this may be worth considering as an alternative.
Basically, you would create a Zendesk end user that has this Slack email address, and then you would use the assume feature to make them a Follower on the sections you want to receive notifications on.


The notifications will be a lot less neat than what you could achieve with something like Zapier.
I hope this helps you out somewhat.
0
Casie Riodique
Hey there Jacob the Moderator
I was able to set this up in my instance with no issue, thanks for the great documentation!
I was wondering if someone here or you could point me in the right direction for one request, is it possible to set up some kind of automation or edit the webhook where when a ticket is updated it provides the ticket update in the ticket thread?
0
Chris
This post is awesome, I followed it step by step and have this working perfectly. Does anybody know if there is a placeholder for voicemail transcripts? This would be a neat inclusion in the Slack notification.
0
Jacob the Moderator
Hi Chris,
I'm glad you like the post, appreciate that!
I'm not familiar with Talk and how transcripts are handled but if it is added as an internal comment, you should be able to have your trigger hook into the right event and then use one of the comment placeholders for your webook and bring it into the Slack notification.
0
Joon Hwang
Hi Jacob the Moderator ,
Thanks for your article. I've followed the steps exactly but no matter what I change in terms of auth in Zendesk or Slack, my response on "Test Webhook' returns a 400 no_text and the same under activity for the webhook, 400 Bad Request.
Do you know how I can fix this issue?
0
Jacob the Moderator
Hi Joon Hwang
I'm no longer as familiar with Slack, but it looks like the JSON payload you're sending is missing the ‘text’ element, what carries your message.
When I look at my Zendesk trigger that has the webhook action, I can see that I have the following payload:
With this payload I get the following message in Slack:
Hope that helps you out!
0
Jacob the Moderator
This is what it looks like for me in the webhook activity log.
0
Joon Hwang
That was super helpful, our JSON did indeed have no text element which was an oversight on my part. Thanks so much!
1
Jacob the Moderator
Joon Hwang That's awesome 👍
Casie Riodique Sorry I missed your question earlier!
Do you want to have comment updates on tickets create messages in Slack?
I don't see any technical reason you couldn't do this with the proper trigger condition and comment placeholders, however, that sounds like a lot of noise to introduce into Slack, and you may introduce PII that may give you a GDPR headache down the line.
Let me know if I completely misunderstood you 😊
0
Joy Daludado
Hello Jacob the Moderator!
Is there a way to create a Team Publishing trigger? For exmple, when a help article has been reassigned?
0
Jacob the Moderator
Hi Joy Daludado
I'm not sure that exact event is available, but webhooks do have some article-related events that could be investigated as a triggering event: Article events.
👆 This event could be used to start a flow (using a Zendesk webhook), but you would need some kind of middleware (Zapier, MS Power Automate or a ZIS flow for example) to take the Webhook response and modify it into a readable message and send that to Slack.
0