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
Official
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.
Best,
PJ
0
Dan Cooper
Great post!
1
Brett Bowser
This is awesome. Thanks for sharing Jacob!
1
Jacob the Moderator
Thanks, guys!
0
Jennifer Rowe
Excellent tip, Jacob! Complete with step-by-step instructions and screen shots.
Thanks for sharing!
1
Jesse Marion
*Updated* HI @... Thank you for this article, I am experiencing an issue getting the notifications into slack which I am hoping you can help me out.
Objective: send Slack Notification for tickets with High or Urgent priority to the assignee when end-user has replied to a ticket.
I tested the Extension and received the notifier via my personal slack DM/Channel, my test ticket will send directly to me if the ticket has a MEET any condition of Assignee is Jesse Marion
Is there any rule/code that can DM the assignee of a ticket when the end-user replies on a ticket with Urgent/High priority? @Slack_user or something?
0
Jacob the Moderator
Hi Jesse,
I'm glad you're finding the article useful. It has been a while since I set this up and I'm not currently relying upon it for work.
I'm sure there is a way to achieve the advanced DM setup you're seeking, but it's a bit out of my reach at the moment.
I would probably opt for something simpler like a shared channel and have the individual agents set up keyword alerts for their agent name.
Is that something that could work for you?
0
Yaroslav Anyukhin
Used this post twice already, how come I can't like twice ? :)
2
Nicole Saunders
It's just the way Gather's voting works. But we are so glad to hear that @...'s post has been so helpful to you!
1
Jamal Westfield
Hey,
Is there any to implement slack @here for example in these webhooks?
Thanks
0
Jacob the Moderator
Hi Jamal,
Sorry I didn't see your comment until now.
Adding the following to the "text" part of your JSON should include an @channel mention to the message:
This is what it looks like for me:
I haven't tested if the same is true for @here, but perhaps you can try that out and let me know how it goes?
0
Richard Ly
Great article and easy to follow.
Thanks for putting this together.
1
Ali Madlool
Is it possible to use this to send DMs to end-users when they create tickets? and follow up updates whenever the ticket is updated?
0
Shamim Rehman
Would this works with conditions of:

and cause a slack message to notify the channel that there was an inbound call or does it only work with an actual ticket creation (end state)?
0
Brett Bowser
Hey Shamin,
This would only work once the ticket is created since Triggers can only function on tickets.
0
Jacob the Moderator
Hi Ali Madlool,
That sounds interesting, could you maybe elaborate a bit on what you have in mind? Are your end users/requesters part of your slack workspace?
0
Ali Madlool
Hi Jacob,
Yes, end users are part of our slack workspace.
What I had in mind is the ability to do exactly what is shown here in this article but instead of pushing it to public channels, I want to push them to the specific user's DMs
0
Jacob the Moderator
Hi Ali,
Sorry for the late reply here!
I'm not sure it is doable, last I checked something like that I believe there was a limitation on Slack's end sending DMs, but I could be misremembering. Unfortunately, I don't currently have the bandwidth to investigate further.
I do hope you find a solution and if you do please share it here.
0
Viktor Hristovski
Hi Jacob,
is it possible to @someone in the message?
Right now im using {
"text": @{{ticket.assignee.first_name}}.{{ticket.requester.last_name}}"
}
But it posts this in the slack channel as just a normal text . I'd like to ping the user to which the ticket belongs to (the assignee)
Thank you
0
Jacob the Moderator
Hi Viktor,
I suspect that your agent's slack username is not exactly the same as their name in Zendesk.
Perhaps you could create a user field for the slack user name, have agents fill that out, and use the placeholder for that in your message.
Or is the issue that it is the right username, but it doesn't hyperlink/@mention the user?
0
Jacob the Moderator
Just to expand upon the above, it seems the notation that Slack requires for @mentions is
Where "U024BE7LH" is the member ID of the user you want to at-mention. I just did a test, and that worked for me.
0
Jacob the Moderator
This is the message I used for the above example (slack_member_id is the field key I used for the user text field holding the assignee's Slack Menber ID):
0
Viktor Hristovski
Hi Jacob, yes that worked. I only had to use <@{{ticket.assignee.custom_fields.slack_member_id}}> for it to work.
Thank you again so much
1
Jacob the Moderator
Nice 👍
0
Kat Corzati
Hi Jacob, thanks for your very clear setup here! It looks like the HTTP target's been replaced by the URL target per Zendek's callout on the Extensions page:
Using Slack's Zendesk Notifier to create a webhook URL no longer allows content type to be identified, and instead asks for attribute name. I've tried a couple things but keep failing the call. Can you help identify the message attribute? I'm attempting to notify a specific channel of ticket creation by linking the URL with ticket title to the channel and am unable to find the proper documentation anywhere.
0
Jacob the Moderator
Hi Kat,
Glad you like it! You are correct, HTTP targets are or have been deprecated, you should be using Webhooks instead.
I've been meaning to update this article, but just haven't had the time.
I did manage to update the HTTP target to a Webhook, and have it working. Leaving a screenshot for you below - hope that helps.
0
Sean Bourke
Hi Jacob the Moderator, thanks for creating and maintaining this article. I've updated your existing HTTP section below to reflect the process for using Webhooks.
Create a Webhook (in Zendesk)
Navigate to the Webooks page: Admin Center > Apps and Integrations > Webhooks, and click Actions > Create Webhook.
In the Create Webhook screen, enter:
Press Create and then press Complete setup on the following screen.
Now that you've created a Webhook linking Zendesk to that Slack Channel, you can create a Trigger following the original post, but instead of selecting Notify target, you select the Notify active webhook action and select the webhook created above.
1
Jacob the Moderator
This announcement about support for Slack DMs might be worth a look for some on this thread:
https://support.zendesk.com/hc/en-us/articles/4933457212442--Announcing-Slack-Direct-Messages
0
Jahn
Hello Jacob Christensen I am trying to follow the process but I don't have the option "Send notification to Slack".

So I cannot really proceed.
0
Jacob the Moderator
Hey Jahn
That was the title I gave to my webhook. You should look for whatever you called yours.
Let me know if you need more directions.
0