There are several methods, but I wrote the following article "[How to do 2 (via app)](Summary of how to notify slack with python) ) ”Is often used. Summary of how to notify slack with python
Mentions can be added by writing the following in the text parameter.
<!subteam^id>
In the above notation, if ʻidis the id of the user group and the id of the user group is "A123BCDEFGH" It will be written as
<! Subteam ^ A123BCDEFGH>`.
(You can check the user group from slack in "Member Directory and User Group> User Group")
Go to the following page of slack API, fill in the Value of Required part and press "Test Method". For Value at this time, use the Value of the workspace where the user group whose id you want to check is set. https://api.slack.com/methods/usergroups.list/test
Then, the following result will be returned. Find the user group name you want to mention from "name" in it, and the id in that object will be the target.
All displayed results are in Unicode notation.
The notation of the basic mention destination is as follows. Change of mention specifications via Slack API (2018/9/12 ~)
Mentions can be made using <@ display name>
, <! Channel>
, <! Here>
, and <! Everyone>
.
Summary of how to notify slack with python Post to slack with Python3 Change of mention specifications via Slack API (2018/9/12 ~)