Creating and managing triggers for Slack

Return to top

47 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
  • J.J. 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
  • J.J. 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 Hirstovski

    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

    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

    0
  • Paolo
    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 Hopkins

    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! 

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

    0

Please sign in to leave a comment.

Powered by Zendesk