I would like to mention Users Group via Slack API (Rest), is it possible? I tried via
@admins
, <@admins>
, <@ID>
, <!admins>
But it still is showed as a standard text, without mention. Any ideas?
User Groups follow the format <!subteam^ID|handle>
. (subteam
is literal text. ID
and handle
are replaced with the details of the group.) These indicate a User Group message, and should cause a notification to be displayed by the client. User Group IDs can be determined from the usergroups.list
API endpoint. For example, if you have a User Group named happy-peeps
with ID of S012345
, then you would use the command <!subteam^S012345|happy-peeps>
to mention that user group in a message.
https://api.slack.com/reference/surfaces/formatting#mentioning-groups
The easier way to get a usergroup ID is as following documentation; https://api.slack.com/reference/surfaces/formatting#mentioning-groups
In short, open Slack via web browser (not app), then check usergourp link.
With above usergroup ID, the message could be This is message :smile: <!subteam^SAZ94GDB8>
.
The whole format is <!subteam^ID|handle>
but handle
is optional. It is correctly replaced with usergroup name (ie, @dev-team
) without handle
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With