Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slack @here mention in channel via Incoming webhook

Tags:

slack

webhooks

So I have an alert channel that collects messages from slack via incoming webhook. It's one of many tools we use to monitor these couple of apps that normally run without issue, but if there is a problem we want to know right away so we can do something about it. I'm getting emails, etc. but I also want the channel wide slack messages.

What I'm trying to do seems simple enough, but it's not working. I want to trigger an @channel or @here message to alert all the users in the channel at the time, so if the error happens in an environment that matters everyone gets a notification. I'm following examples in the documentation using the <@ABC123> channel id but it's not translating into an @here directive, it's just plain text.

Either what I'm doing can't be done, or more likely I'm missing something somewhere or approaching this incorrectly. I'm guessing it's the latter, but at this point confirmation that I can't do what I'm trying to do is fine, I'll come up with something else.

like image 220
Francisco Garcia Avatar asked Dec 23 '22 23:12

Francisco Garcia


1 Answers

Found it enter image description here

Apparently the convention for the channel alerts are <!channel>, not <@C123> as is with users or channel ids, or <#channel> with channel mentions (though that does work, just not as a channel wide alert). Hope this helps someone eventually.

like image 196
Francisco Garcia Avatar answered Dec 26 '22 00:12

Francisco Garcia