Skip to content

Slack ​

The Slack notification service uses either Slack Webhooks or the Bot API to send messages.

See the guides for information on how to get your token and channel.

https://shoutrrr.nickfedor.com/services/chat/slack/

URL Format ​

Note that the token uses a prefix to determine the type, usually either hook (for webhooks) or xoxb (for bot API).

URL Fields ​

  • Token - API Bot token (Required)
    URL part: slack://token:token@channel/

  • Channel - Channel to send messages to in Cxxxxxxxxxx format (Required)
    URL part: slack://token:token@channel/

Query Parameters ​

Props can be supplied through URL query params: ?key=value&key=value etc.

  • BotName - Bot name
    Default: empty Aliases: username

  • Color - Message left-hand border color
    Default: empty

  • Icon - Use emoji or URL as icon (based on presence of http(s):// prefix)
    Default: empty
    Aliases: icon_emoji, icon_url

  • ThreadTS - ts value of the parent message (to send message as reply in thread)
    Default: empty

Color format ​

The format for the color prop follows the slack docs but # needs to be escaped as %23 when passed in a URL.

So #BADA55 would be %23BADA55 etc.

Examples ​

Bot API ​

slack://xoxb:123456789012-1234567890123-4mt0t4l1YL3g1T5L4cK70k3N@C001CH4NN3L?color=good&title=Great+News&icon=man-scientist&botname=Shoutrrrbot

Webhook ​

slack://hook:WNA3PBYV6-F20DUQND3RQ-Webc4MAvoacrpPakR8phF0zi@webhook?color=good&title=Great+News&icon=man-scientist&botname=Shoutrrrbot `

Released under the MIT License