Creating and managing triggers for Slack

Return to top

43 Comments

  • Phil Andrews

    Is there a way to @ mention users in Slack based on the assignee name on the ticket?

    1
  • Dainne Lucena
    Zendesk Customer Care

    HiPhil 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
    Zendesk Product Manager

    HiPhil 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 infoDainne Lucena!

    @...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:


    *Requester*: {{ticket.requester.name}}
    *Ticket Group*: {{ticket.group.name}}
    *Details*:
    {{ticket.latest_comment}}

    4
  • Sean Bourke
    Zendesk Product Manager

    HiShane Caplice,

    Thanks for your feedback. At the moment, there is no way to limit notifications also being sent to the channel. We've recently launched the ability to notify Slack via triggers and aligned this closely to how it worked previously (notifying the channel), but added threading to support better contextualisation. I've recorded this feedback for consideration in future enhancements of this capability.
    -1
  • 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
    Zendesk Product Manager

    HiAlan 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 theNotify Zendesk Integration > Slackaction. 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 thisarticle? 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
    Zendesk Customer Care
    Hi Alan,

    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.

    3
  • 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:

    • After the automatic conversion created the new trigger with the "Notify Zendesk Integration" action we should deactivate the old "Notify active webhook - Slack integration endpoint" trigger, right?
    • The new Slack integration notification triggers do not appear to show up in the ticket events history when they fire. Am I missing something or is this a known thing?

    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
    Zendesk Product Manager

    HiRonald,

    Apologies for the delayed response! Here are the answers to your two questions:

    • Yes, you can deactivate this trigger once all the conversions have been completed
    • Thanks for flagging this, we have now fixed this and the trigger events should now be showing

    Thanks,

    David

    1
  • Aicha Diarra

    Hi Zendesk team,

    Thanks for your feedback. At the moment, there is no way to limit notifications also being sent to the channel. We've recently launched the ability to notify Slack via triggers and aligned this closely to how it worked previously (notifying the channel), but added threading to support better contextualisation. I've recorded this feedback for consideration in future enhancements of this capability.

    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.

    1
  • 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 echoDavid 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 :/

    • Open ticket updated by [requester]: [Ticket.id
    • New ticket from [requester]
    • Ticket [action] by [assignee]

    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 Sbeihagreed - 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.

    0
  • 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.

    {{ticket.description | truncate: 1000 | split:'STATEMENT OF CONFIDENTIALITY:' | first }}

    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 Breenthanks 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 RoseI 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
    Zendesk Product Manager

    HiJJ 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 settingscommand within Slack.

    David Rose——你可以包括任何ofthe following placeholdersin 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——你应该能够在th包含这些内容e 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

    David Gillespiethanks for the multiple trigger suggestion, that's now working.

    JJ Breenthanks 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 ?

    "PRIVATE COMMENT": {% assign truncated_string = ticket.latest_comment | replace: '\n+', '\n' | truncate: 500, "" %}
    {{ truncated_string }}{% if ticket.latest_comment.size > truncated_string.size %}{{ " - comment truncated" }}{% endif %}

    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 Breenmmm, 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.

    它甚至可能更容易取代任何翻倍s 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

    ThanksDavid Gillespie. 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:

    • 1 (albeit noisy, but useful) channel getting all ticket update notifications
    • 1 channel getting new ticket notifications (important!)

    To silence. Seemingly without warning. Obvs this is a right pain. Lovely.

    0
  • David Gillespie
    Zendesk Product Manager

    HiRichard B,

    The legacy app that was owned and supported by the Slack team was removed, thecurrent Zendesk owned appis actively owned, maintained and available.

    Are you able to confirm you've still gotthe Zendesk owned appinstalled on your Slack account and were/are using this for notifications?

    0

Pleasesign into leave a comment.

Powered by Zendesk