Recent searches


No recent searches

Creating and managing ticket triggers for Slack



image avatar

Kristie Sweeney

Zendesk Documentation Team

Edited Dec 17, 2024


1

59

59 comments

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


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


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


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


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


image avatar

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


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


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


image avatar

Dane

Zendesk Engineering

Hi Matthew,

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

0


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


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


image avatar

Jahn

Zendesk LuminaryCommunity 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


image avatar

David Gillespie

Zendesk Product Manager

Hi Jahn,

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

Thanks,

David

0


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


image avatar

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


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


Hello @..., 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


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


image avatar

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


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


image avatar

Heather Rommel

Zendesk LuminaryThe Product Manager Whisperer - 2021Community Moderator

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


image avatar

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


image avatar

Tony

Zendesk Customer Care

Hi Heather,
I agree with David! Thank you for your feedback!

0


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


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


The trigger we use to notify our team slack channel of new ticket previously included the color of the ticket status (yellow, red, blue). This seems to have changed with a product release over the weekend. As of Monday morning none of our tickets have the color line and we made no changes to the tigger. Is there a way to add it back? It was helpful to see which tickets were auto-assigned, which need to be manually assigned, and which start off as pending. 

1


Hey there Zendesk team! We're facing a similar problem to what Melissa McFarland experienced. Can you lend us a hand?

0


image avatar

Destiny

Zendesk Customer Care

Hello Mihn and Melissa,
 
Thank you for providing your valuable feedback.
 
Our development team has taken your feedback into consideration and devoted time over the past weekend to decouple the notification modifications from the broader multi-instance release. As a result, we're reverting the notification messages back to their previous style.
 
The original updates to the notifications were intended to modernize the integration by moving away from Slack's legacy message format in favor of the newer block-kit format, which Slack advises. Although a future shift to block-kit is inevitable, we are committed to collaborating closely with Slack and our customers to ensure the transition is as smooth as possible. Slack has assured us that the legacy message format will continue to be supported while we complete our migration strategy.
 
With these adjustments, the notification colors for ticket statuses in Slack should be restored to their former display. Please don't hesitate to reach out if you come across any additional concerns with the integration. Thank you!

1


Checking back in on the following point on thread responses also being sent to channel - per this thread, sounds like this has been logged a few separate times. Any updates on when it may be implemented? The way this currently works creates way too much noise - love the thread concept but not every thread response sending to channel.

 

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.

0


Please sign in to leave a comment.