When using the Slack for Zendesk Support integration, you can set up ticket triggers to notify Slack users about Zendesk ticket events in specified Slack channels.
This article covers the following topics:
- Creating ticket triggers for Slack ticket notifications
- Using Markdown to format text and alert users in Slack
- Managing ticket triggers for Slack
Related articles:
Creating ticket triggers for Slack ticket notifications
Remember that before creating a ticket trigger, you must add the app to the Slack channel where you’d like to send the notification. You must be an admin to create triggers for Slack.
-
In Admin Center, click
Objects and rules in the sidebar, then select Business rules > Triggers.
Tip: You can also create and manage Slack triggers in Slack integration settings by navigating to Admin Center > Integrations > Integrations and clicking View under Slack. - On the Triggers page, click the Tickets tab.
- Click Add trigger.
Alternatively, you can copy an existing trigger and modify it.
- In the Trigger name field, enter a name for the trigger.
It's recommended to include the Slack workspace and channel in the trigger name to help identify it. Example: "New ticket for #delivery-support - Workspace 1"
- (Optional) Enter a Description for your trigger to provide details
about what the trigger does.
Example: "Notifies all users in the #delivery-support channel when a new ticket is assigned to the Support group."
- Select an existing Category for your trigger or create a new one.
It is recommended to create a Slack category for your Slack triggers.
- Click Add condition to set up the trigger to meet All or
Any conditions.
Conditions are the qualifications needed for the trigger to fire.
- Select a Condition, Field operator, and Value for each
condition you add.
The field operator determines the relationship between the condition and the value. For example, if you select the field operator "Is", your condition must be equal to the value. Different conditions will contain different field operators.
See Building trigger condition statements.
Note: It is recommended to keep your trigger statements simple. The more complicated a trigger is, the harder it will be to troubleshoot and maintain. - Click Add action, then select Notify Zendesk integration and
Slack integration from the drop-down lists.
- If you have multiple Slack workspaces connected to this Zendesk account, choose the workspace in the Slack workspace field.
- In the Slack channel field, select the channel you want notifications
posted in.
Only channels to which the Zendesk app has been added appear in the drop-down list. To see additional channels here, add the app to those channels. If you see the message
Slack channels couldn't be loaded
, then the Zendesk app hasn't been added to any channels.The Slack channel list includes private channels that you (the current admin) are a member of. If the app is a member of a private channel you're not a member of, you won’t see it here until you are invited to that channel. If you don't see your private channels in Zendesk (and you do see them in Slack), make sure you added the Zendesk app to these channels. Also, ensure that your default email in Zendesk matches your Slack email address.
If you are editing a trigger and don't have access to a private channel listed here, "Private Channel" displays in this field, but you can still edit and save the trigger.
- Use static text and placeholders in the
Notification header and Notification body fields to create
the notification.
A simple notification header and body have been created for you. You can use these as-is or modify them. You can also use markdown to alert channel members or format text in Slack.
Below is an example notification header and body configured in a trigger and the resulting notification in Slack.
- Click Create.
Your new trigger is added to the end of the list of triggers. You can reorder the list of triggers or edit any ticket trigger.
Using Markdown to format text and alert users in Slack
Slack supports Markdown, which is a formatting syntax for plain text. For example, if you surround a word with asterisks (*like this*), it appears bold in Slack.
Slack also supports user @mentions and alerts, which can be especially useful in ticket notifications. For example, add <!here> in the message header to alert all members of the Slack channel when a notification is posted.
The table below includes the Markdown formatting you can use in the Notification header and Notification body of your Slack triggers.
Type | Markdown | Result |
---|---|---|
Italics | _italic_ |
italic |
Bold | *bold* |
bold |
Strikethrough | ~strike~ |
![]() |
Emojis | :smile: |
![]() |
Channel alert (notify channel) | <!here> |
Notifies all members of the channel. |
User mention |
To notify user ID U024BE7LH:
|
Links to the mentioned user’s Slack profile, and the mentioned user is notified. |
Group mention |
To mention a Slack user group, provide the group ID using the following syntax:
!subteam^
is required before the group ID. |
Links to the mentioned group’s Slack profile, and all members of the mentioned group are notified. |
Managing ticket triggers for Slack
View your ticket triggers for Slack on the Triggers page, where you can manage your existing triggers and create new ones.
See Opening and viewing your triggers list for more information on accessing and taking action on triggers.
59 comments
Phil Andrews
Is there a way to @ mention users in Slack based on the assignee name on the ticket?
2
Dainne Kiara Lucena-Laxamana
Hi Phil Andrews,
Not at the moment. But I did see a similar request submitted here: @mention slack user functionality on Zendesk.
You can up-vote that original post and add your detailed use-case to the conversation. Threads with a high level of engagement ultimately get flagged for product managers to review when they go through roadmap planning.
1
Sean Bourke
Hi Phil Andrews,
Thanks for sharing this question - I'd be keen to understand the use case a little better.
Are you looking to include the assignee in the message to a channel (as a tag), or are you seeking to notify the assignee directly?
0
Phil Andrews
Thanks for the info Dainne Kiara Lucena-Laxamana!
@... I'd be looking to include the assignee in the message to a channel as a tag. So for instance whenever a ticket is assigned we send a message to a Slack channel with info on the ticket/orgnaisation and tag the assignee - we currently do this via webhook and Zapier. It would be preferable to do this via the ZD Notification instead.
We also do this because the in-page notifications in Zendesk aren't great. Using Omnichannel routing we can only notify the assignee via email but we don't use email often so that's not really useful. The notification icon in Zendesk itself also only works with Messaging chats, and not email tickets - so again we're missing a notification opportunity. Slack is the best we've found so far given how much our team are on Slack.
0
Shane Caplice
I have a trigger to notify Zendesk integration > Slack integration > Private Channel
When trigger is actioned, it will post into the channel fine, however when the ticket has a comment update, we want the response to add to the thread (which it does) - however when the thread is replied to, it will automatically send the response to the channel too? This causes way too much noise within the slack channel.
There seems to be no setting within slack for this to happen by default.
Notification Body:
<https://{{ticket.url}}|*{{ticket.title}}*>
*Requester*: {{ticket.requester.name}}
*Ticket Group*: {{ticket.group.name}}
*Details*:
{{ticket.latest_comment}}
6
Sean Bourke
Hi Shane Caplice,
-2
Alan Butcher
Hello!
I am trying to add the organization's name to our Slack notification, I cloned the default trigger and am using the given place holder, but what do I use in front of the placeholder? Just "organization"?
For example, here is our default trigger:
{
"ticket_id": "{{ticket.id}}",
"status": "{{ticket.status}}",
"updated_at": "{{ticket.updated_at_with_timestamp}}",
"subdomain": "{{ticket.account}}",
"ticket_latest_comment": "{{ticket.latest_comment}}",
"updated_by": "{{current_user.name}}"
}
Would this be the correct way to add an organization to it?
{
"ticket_id": "{{ticket.id}}",
"organization": "{{ticket.organization.name}}",
"status": "{{ticket.status}}",
"updated_at": "{{ticket.updated_at_with_timestamp}}",
"subdomain": "{{ticket.account}}",
"ticket_latest_comment": "{{ticket.latest_comment}}",
"updated_by": "{{current_user.name}}"
}
Thanks!
0
Sean Bourke
Hi Alan Butcher,
That looks like the trigger which supports legacy notifications and instead notified a webhook. If you have existing notifications, you can migrate these from the Slack Admin Center page and then add the organization placeholder.
Alternatively, you can create a new trigger and select the Notify Zendesk Integration > Slack action. From here, you'll be able to add organization to the default Slack notification placeholder.
0
Alan Butcher
Hi Sean, I posted a screenshot with our current trigger notification. Are you referring to updating our legacy Slack notifications referenced in this article? And if so, when adding the organization placeholder to my new trigger, do I have the correct syntax in the following, specifically the syntax before the placeholder, do I add "organization" before the placeholder, or is it something else, or does it matter?
"organization": "{{ticket.organization.name}}"
0
Gab Guinto
From your screenshot, it looks like that is a legacy Slack trigger. You can convert the legacy triggers or create a new one as Sean mentioned. The action should be: Notify Zendesk integration > Slack Integration.
From there, you can edit the text to include the organization in the Slack notification. Example:
0
Alex Daley
Will this new format ever be added to Automations? I see that still only supports the legacy webhook notifications.
4
Ronald
I just found this long awaited feature when I was working on setting up a new Slack notification. Very glad I don't have to coordinate through IT (Slack workspace admin) for these on an already connected Slack workspace.
Two things I've come across when converting Legacy notifications, maybe I missed them:
I've disabled the old Slack notification webhook and confirmed it's all working as expected/required despite not seeing the new trigger event showing up in the ticket events. So I'm pretty sure I've got everything correct here but these two things I thought I'd check on 🙂
0
David Gillespie
Hi Ronald,
Apologies for the delayed response! Here are the answers to your two questions:
Thanks,
David
1
Aïcha Diarra
Hi Zendesk team,
Has there been any change to this behaviour yet? We've recently migrated to the new triggers as advised and this is extremely noisy now that every response is sent to the channel. This is such a big change to the behaviour of the integration, I'm surprised it's not configurable for clients who were happy with the way the integration used to work.
2
David Rose
Is there anyway to see within Slack if this is a public or private comment ?
Also, with the Legacy trigger the first few lines of the ticket were displayed in Slack along with a "see more..." link. With the new trigger, the whole comment is displayed, which can be 2 or 3 Slack screens long, making the integration difficult to use successfully. Is there any plan for a "shortened comment" placeholder ?
1
JJ Breen
I echo David Rose's comment about the difference between the legacy triggers and the new trigger. I'm looking for the "shortened comment" placeholder to keep our Slack channel from becoming an unreadable mess, especially for mobile users.
Unfortunately, it seems that the timeline for removing the legacy triggers was moved up by a full month, so we lost our integration overnight last night and I'm getting pressure and complaints about getting it running to look the way it used to.
Edited to add: As I'm researching this more, I'm remembering that this may be a limitation within Slack itself, and with using their "Block Builder" method instead of "Attachments". See here: https://api.slack.com/messaging/composing/layouts#when-to-use-attachments
1
Fatima Sbeih
I was caught by surprise by this as well (JJ Breen) and now need to rebuild the notifications.
Previously, we would see auto generated notification headers (examples below). How do i get those back? I see the new ticket ID at the bottom, and thats fine, but we need those headers and i have no idea how to bring them back :/
0
David Rose
Ah glad I wasn't the only one caught out I lost our legacy integrations today and had to reschedule a load of other work to fix this.
Pretty poor show from Zendesk really. I've double checked and I've had no reminder emails about this during the past 3 months and would it have been that difficult to get the legacy or new addon (as we already had it installed) to post something to slack as an indication too.
0
David Rose
Fatima Sbeih agreed - I can't see any way in slack to show whether this was a response from the customer or the agent.
0
Ronald
I had my Slack integration updated but only because I just happened to run into something last month where I had to create a new Slack notification and during the process of setting it up found that the long awaited enhancements to the integration were live. So I updated the others at that time. But if I had not needed to create a new notification recently I probably would have been caught off guard by this also.
I feel like you often have to go out of your way to keep up with Zendesk platform updates. IMO if your instance is using a feature that is going to be changed or deprecated you should always get an email or perhaps your CSM should reach out. Zendesk has sent emails but it's definitely not the norm.
0
David Rose
We also need to be able to turn off threads. The tickets are just overwhelming the threads virtual channel and our users are complaining that everything else is being hidden in the noise.
2
JJ Breen
Two pieces of news:
1. Because the legacy integration used Attachments instead of Blocks, and attachments are deprecated by Slack, it has proven to be very difficult to mimic the layout using triggers.
2. I was able to use some Liquid markup to pare down our notifications (longer emails would fail to send to Slack because they would overflow the JSON length buffer), notably by using `truncate` to limit the overall characters and `split` to get rid of our company's email footer. Unfortunately, this method CANNOT be used to get the "Show More" link.
I fired up the Slack API to pull messages out of Slack from the legacy integration to see how they were formatted. Unfortunately the data stored within Slack is the raw JSON that was sent from ZenDesk, so I can only somewhat mimic the layout.
There do not appear to be any tags visible in the ZenDesk JSON builder that are solely for the email body; the legacy Slack/ZenDesk integration appears to have been a "Black Box" that lacked documentation on how it actually went about building the JSON from the message body.
0
David Rose
JJ Breen thanks for that info. Where can I find some documentation on liquid markup ?
I'd be happy truncating the message without a "Show More" link
I'd also love to be able to remove any links that Slack can't render e.g
![](https://mysubdomain.zendesk.com/attachments/token/0TOUfH2CV8jkm7J9GWxIJ0fmD/?name=image437992.png) ![](https://mysubdomain.zendesk.com/attachments/token/4F2waps0vMYcptSO5i0d3w8PF/?name=image078990.png)
as they're pretty useless and many of our customers have 5 or 6 images in the email footer, which just takes up message space.
0
JJ Breen
David Rose I found some information here:
https://support.zendesk.com/hc/en-us/articles/4408836545562-How-can-I-format-placeholders-with-liquid-markup-
Which linked to this article on GitHub:
https://github.com/shopify/liquid/wiki/liquid-for-designers
I also grabbed some of my information from this StackOverflow thread (specifically, the Split/First pipe combo):
https://stackoverflow.com/questions/71068719/is-there-a-way-to-truncate-text-using-liquid-markups
From a past life (and somewhat in my current), I have familiarity with AIX/Unix command lines, so the syntax of "piping" data from one command to the next in Liquid was pretty easy to wrap my head around.
0
David Gillespie
Hi JJ Breen, Ronald, David Rose, Fatima Sbeih,
Apologies for the confusion about the EOL of the legacy Slack integration. Messages should have been sent to all the Slack admins who were using the old Slack integration, and we apologize if any folks were missed.
With regards to the removal of the old notifications of the app owned by the Zendesk team (i.e. the notifications that were managed from within Slack), we’re shifting the date of this removal back to later in 2023, more to be announced shortly. Customers can continue to self-migrate to Slack notifications via triggers from both Admin Center and the /zendesk settings command within Slack.
David Rose - you can include any of the following placeholders in the content of the notifications. I can’t see a specific placeholder which says if a comment is public or not, but you could create separate triggers for public & private comments, and then modify the content of each to notification to state which it was.
We’ve also captured your feedback about turning off threads.
Fatima Sbeih - you should be able to include this content in the header and notification body by modifying this within the trigger, by following step 10 and the Using Markdown section.
JJ Breen - thanks for your digging into the legacy Slack app & helping with solutions!
0
David Rose
@... thanks for the multiple trigger suggestion, that's now working.
JJ Breen thanks for the liquid markup pointer, I've kind of got it working (but not quite), don't know if you can see what I've done wrong ?
What it supposed to do is replace multiple blank lines with just one, for those users that like to add surplus blank lines. This doesn't see to work, so either the string doesn't use \n or my code is wrong (very likely). Also after the string has been truncated (which does work) the second part is supposed to amend the string " - comment truncated." I don't seem to be able to get this to work - tried a number of different formats such as that above and without a {{ }} around the
" - comment truncated" string, but that string never appears in slack.
0
David Rose
JJ Breen mmm, oddly the " - comment truncated" string appears on some truncated tickets but not on others. Can't see any logic to why though.
0
JJ Breen
David Rose, one of the ways I found that I was overflowing the JSON buffer length was to go into ZenDesk, Admin > Webhooks, select the webhook that controls the slack message, select the "Activity (Beta)" tab, and then look at the individual invocations. Clicking the Invocation ID will open a panel that looks blank, but there's a small down arrow that you can click to see the raw JSON that was sent to the API. It was looking at those where I found that I had massively long JSON messages, or see that there was information that was mis-formatted and causing failures.
I can't seem to find any documentation on how to reference "multiple instance match" a-la regex, so I don't know if '\n+' is supported or not. If it isn't, then the only thing I could think of would be to recursively convert double-newlines to single newlines until only single newlines remained.
It might even be easier to just replace any doubles with singles and not perform the action recursively, as that may clean up 90% of the extra whitespace.
You could possible also do this after truncating instead of before, if for no other reason than to limit how many newlines need to be replaced.
0
Richard B
Thanks @.... But doesn't the "/zendesk settings command" etc. require the legacy app to still be installed in Slack? Ours was automatically removed on 1st March.
Having followed the steps to Convert Notifications, we've ended up with a single trigger, which does nothing at all!
So we've gone from having:
To silence. Seemingly without warning. Obvs this is a right pain. Lovely.
0
David Gillespie
Hi Richard B,
The legacy app that was owned and supported by the Slack team was removed, the current Zendesk owned app is actively owned, maintained and available.
Are you able to confirm you've still got the Zendesk owned app installed on your Slack account and were/are using this for notifications?
1