Creating and managing triggers for Slack

Return to top

55 Comments

  • Richard B

    Hi David

    Yes, have had that app for years and still do. Managed to get it working now by creating various new triggers. Seems that Convert Notifications only created a rather nonsensical lone trigger. Which was odd. 

    Notifications now being received in Slack again. 

    0
  • Jira-Bot

    I have changed my Zendesk agent's name and email address, and now I want this name change to show in the Slack interaction.

    But this is not happening. The account's old name keeps showing in the Slack updates, instead of the new one.

    I have been up and down all over the integration, and I can't fins any place where this is "hard coded" or any such thing. Is this coded into the integration when it gets created the first time? Or is there a way for me to achieve this - other than tearing down the current integration and start over? (problem here is that I don't have admin rights to the Atlassian side, and it will probably take me a long time to  coordinate with other admins for this to happen).

    0
  • JJ Breen

    David Rose, how did you make out with the '-truncated message' addition?  Any rhyme or reason to it appearing?

    How about removing images and tags from the JSON; that is the one part that I'm still struggling to remove from our slack notifications.  As you mentioned, when clients have all of their social media icons listed in their signature block, the channel fills up with a ton of useless noise.

    0
  • Tom Walker

    Phil Andrews - What you are looking to do is possible. If you are part of Support Driven Slack, you can see a complete walk through of how that would be done, but the pieces that are necessary to make that happen are to have a custom field on the user object that contains the slack ID of the user and then you can reference {{ticket.assignee.custom_fields.customfieldnameforslackID}} in your triggers/automations. You can then either route the Slack messages to a channel or DM the assignee via a webhook that connects to Slack.

    0
  • JJ Breen

    David Rose, I think the "truncated message" oddities may result from the way the original message is being truncated.  I would change the 'if' statement to ' if ticket.latest_comment.size > 500', rather than comparing it to the length of the truncated string.

    As far as removing images, here is the Liquid markup that I came up with to remove all of the extraneous image tags from the Slack message. You can add any additional logic for truncation and whatnot to the "clean_description" variable at the end.

    Here's the logic:

    1. If you find the character set '![' in a ticket description, then:
    2. Split the string on the '![' character set
    3. Append the first sub-string into a 'clean_description'
    4. For each sub-string after the first sub-string, split on ')', which is the end of the image tag. 
    5. For each of these new sub-sub-strings, get rid of the first item (the entire image tag) and append the rest back into the 'clean_description' string, replacing any subsequent closing parentheses in case someone was using parentheses in their text.
    6. Iterate over the rest of the sub-strings that came as a result of splitting on '!['
    7. If you didn't find '![', then just assign the ticket description to the 'clean_description' 
    8. Finally, output the 'clean_description'

    I've tested this through most of the afternoon today and have had good success with cleaning images and other tags out of the ticket descriptions in our Slack notifications.

    Hopefully this helps at least one other person besides me.

    {% if ticket.description contains '![' %}
        {% assign description_cleaner_array = ticket.description | split:'![' %} 
        {% for description_item in description_cleaner_array %}
          {% if forloop.index == 1 %}
                {% assign clean_description = description_item | append: ' ' %}
            {% else %}
                {% assign part_two_array = description_item | split:')' %}
                {% assign part_two_text = '' %}
                {% for part_two_item in part_two_array offset:1 %}
                    {% assign part_two_text = part_two_text | append: part_two_item %}
                    {% if forloop.last == false %}
                        {% assign part_two_text = part_two_text | append:')' %}
                    {% endif %}
                {% endfor %}
                {% assign clean_description = clean_description | append: part_two_text | append: ' ' %}
            {% endif %}
        {% endfor %}
    {% else %}
        {% assign clean_description = ticket.description %}
    {% endif %}
    {{ clean_description | split:'SPLIT TEXT' | first | truncate: 1000 }}
    0
  • David Gillespie
    Zendesk Product Manager

    Hi Everyone,

    With the release of Slack notifications through triggers last year, we had previously communicated the legacy notifications would be deprecated on March 31.

    In order to provide more time to customers to complete the migration, we are moving the deprecation date to September 18, 2023.

    We will be publishing a formal public announcement shortly but wanted to give folks in this forum a heads up first.

    Thanks for your patience and support with the moving to the new triggers notifications.

    David

    0
  • Matt Davis

    It would be great for the Zendesk team to give us a way to bring back the "see more" function or native truncation support, or to build us better ways to clean up ticket text such as offering ticket.description.text_only or another way to strip out HTML and other junk.

    Thanks to others here for pointers to the Liquid documentation - if you are looking for just a simple way to truncate your Slack notifications, you can replace ticket.description (we prefer latest_comment) with this Liquid statement:

    {{ ticket.latest_comment | truncatewords: 100 }}

    It does seem to be possible to "crash" a trigger using more complex Liquid statements.  While I was working on testing a statement that strung together Replace functions to strip out unwanted images and HTML, one version made Zendesk very unhappy, and resulted in all the data being cleared from that particular Trigger Action, leaving it blank.

    1
  • Matthew Gardner

    Is there instructions on how to do this for automations? It seems like it is an older interface and I cannot choose a channel. Is that just broken?

    0
  • Dane
    Zendesk Engineering
    Hi Matthew,

    It will not work for automations for they don't have the actions "Notify Zendesk Integration".
    0
  • Stephen

    Hi Dane,

    Are you aware if there are plans to bring Slack notifications to Automations?
    Having more feature parity between Triggers and Automations would be great.

    0
  • Viktor Hristovski

    Hi all, 

    we dont have the slack integration into zendesk, we only post from zendesk to slack using webhooks (https://hooks.slack.com/services/etc.)

    will this have any impact on us?

    1
  • Jahn Bronilla
    Community Moderator
    Zendesk Luminary

    Kristie Sweeney David Gillespie - same scenario with Viktor.

    We don't have Slack App Integration but rather the Push notifications from Zendesk to Slack? Will this affect or impact us? 

    0
  • David Gillespie
    Zendesk Product Manager

    Hi Jahn Bronilla,

    No, this won't effect the Push notifications from Zendesk to Slack.

    Thanks,

    David

    0
  • Baptiste Germain

    We are in the same need described by Shane here (https://support.zendesk.com/hc/en-us/articles/4963959597594/comments/5156426413594).

    The new integration is nice but we have sooooo many notifications throwned in the channel that it's actually unreadable/unusable.

    We'd approciate (a lot!) if we could decide NOT to get the updates in the channel, only in the thread.

    Thank you in advance

    1
  • Paolo
    Zendesk Engineering
    Hi Baptiste,
     
    Thank you for your insights and feedback about this feature. I encourage you to create a new post in the General Product Feedback topic in our community to engage with other users who have similar needs and discuss possible workarounds. Conversations with a high level of engagement ultimately get flagged for product managers to review when they go through roadmap planning.

    Best,
    Paolo | Technical Support Engineer | Zendesk
    0
  • Tanner

    We have a trigger set up that sends tickets to a channel given certain criteria, but we still have to create a separate side conversation to collaborate on that issue in Slack. Is there a way we can turn that entry in Slack created by the trigger into the side conversation? We want to avoid having multiple threads for an issue and make it easy for agents to coordinate with engineering without needing to leave Zendesk and hunt down Slack threads. Thanks! 

    1
  • Kim Torres

    Hello David Gillespie, I agree with the others' sentiment on tickets being "Also sent to the channel" as too noisy and makes the channel more cluttered. Maybe instead of removing it completely, why not make it optional to the users? Hope you guys can make some updates on this issue since the integration is really helpful. Thank you!

    2
  • Kris

    Have to say this was news to me. Slack integrations for Zendesk stopped working last week and upon investigation, I find this wonderful post.  Everything we once had working beautifully is now gone.  Getting it back will be nearly impossible to the point I will just turn it off.

    0
  • David Gillespie
    Zendesk Product Manager

    Hi Kim Torres,

    Thanks for following up. Appreciate your concerns raised with having all the notifications sent through to the channel but don't have any updates on when we'll make this a configurable option. Will keep you posted if/when we decide to build this.

    Hi Kris,

    Sorry to hear that the notifications stopped working. We had sent comms and apologise if this was missed.

    You should still have the ability to convert your legacy notification settings to new Slack notification triggers in Admin Center. Just navigate to the Slack settings page and there should be an option to action the conversion.

    Thanks,

    David

    0
  • Maxwell Hallock

    These updates to the Slack notification integration have also severely impacted our Support workflows. I'd like to echo others' assessment that tickets being marked "Also sent to the channel" by default creates a ton of unnecessary noise in the channel. Notifications for tickets transitioning from Solved -> Closed are unnecessary, add even more noise, and makes the integration less useful.

    My preference would be for the Slack integration to be reverted to the pre-update implementation. Failing that, adding more configurability options would be extremely helpful.

    Thanks,

    -Maxwell

    0
  • Heather Rommel
    Community Moderator
    Zendesk Luminary
    The Product Manager Whisperer - 2021

    This seems to be hard coded into the trigger; I can't remove this part. We want to use some of these notifications as alerts only and not linkable -- also, we don't use native Priority so we wouldn't want Urgent to show.

    How can we configure this whole bottom line to be taken out?

    0
  • David Gillespie
    Zendesk Product Manager

    Hi Heather Rommel,

    That's correct, that section of the notification is hard coded and can't be removed. I'll capture your feedback as a feature request for the integration and can let you know if and when we build it into the product.

    Thanks,

    David

    0
  • Tony
    Zendesk Customer Care
    Hi Heather,
    I agree with David! Thank you for your feedback!
    0
  • Santiago Enciso

    Hello team, 

    Feel free to direct me to a doc link.

    I'm trying to pass some of the custom fields data from the ticket into the slack notification header. Is this possible? I want to pass the Merchant Domain field, but I can't seem to find an option in the placeholders. 

    Something like this:

    Ticket Status : {{ticket.status}} - Merchant Domain: {{ ticket.custom_field.merchant_domain }}

    Thank you for your help

    1
  • Ryan Gino

    The notification header behavior recently changed. Now the notification header and notification body are sent together which makes the notification header useless. Is there any plan to revert this so that the notification header is sent like a message as you have shown in this document? The previous behavior was more useful.

    0

Please sign in to leave a comment.

Powered by Zendesk