Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to alert a custom group in slack using incoming webhook

I was trying to alert a custom group using incoming webhook in slack.I can able to alert user using <@user>, but with group any of the following format is not working

<!cgroup>
<@cgroup>

What i am missing here. Thanks in advance.

like image 987
John Avatar asked Jan 09 '17 13:01

John


1 Answers

I got this working by adding a link_names attribute to my JSON payload. For example, POSTing this to my Slack hook URL:

{
    "text": "@myusergroup Hello",
    "link_names": 1
}

Caused users in @myusergroup to be notified by the message.

like image 112
oggmonster Avatar answered Sep 20 '22 21:09

oggmonster