mirror of
https://github.com/caronc/apprise.git
synced 2024-12-13 10:21:51 +01:00
Updated Notify_slack (markdown)
parent
3de5b94204
commit
fa2405ac5f
@ -7,12 +7,22 @@
|
||||
### Account Setup
|
||||
Slack is slightly more complicated then some of the other notification services, so here is quick breakdown of what you need to know and do in order to send Notifications through it using this tool:
|
||||
|
||||
First off, Slack notifications require an *incoming-webhook* it can connect to. You can create this webhook from [here](https://my.slack.com/services/new/incoming-webhook/). Just follow the wizard to pre-determine the channel(s) you want your message to broadcast to. When you've completed this process you will receive a URL that looks something like this:
|
||||
First off, Slack notifications require an *incoming-webhook* it can connect to.
|
||||
|
||||
1. You can create this webhook from [here](https://my.slack.com/services/new/incoming-webhook/). Just follow the wizard to pre-determine the channel(s) you want your message to broadcast to.
|
||||
2. Or you can create a Slack App [here](https://api.slack.com/slack-apps) and associate it with one of your Slack Workspaces. From here there are just a few extra steps needed to get your webhook URL (all done through the App's configuration screen):
|
||||
* You must **Activate** the **Incoming Webhook** _Feature_ if not already.
|
||||
* On this same configuration screen, you can create a webhook and assign it to a channel/user.
|
||||
|
||||
Regardless of what option you choose (above), both will result in giving you a webhook URL that looks something like this:
|
||||
```https://hooks.slack.com/services/T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkcOXrIdevi7F```
|
||||
|
||||
This effectively equates to:
|
||||
Apprise supports this URL _as-is_ (_as of v0.7.7_), you no longer need to parse the URL any further. However there is slightly less overhead (internally) if you do.
|
||||
|
||||
This URL effectively equates to:
|
||||
```https://hooks.slack.com/services/{tokenA}/{tokenB}/{tokenC}```
|
||||
|
||||
If you want to convert this to an Apprise URL, do the following:
|
||||
The last part of the URL you're given make up the 3 tokens you need to send notifications with It's very important to pay attention. In the above example the tokens are as follows:
|
||||
1. **TokenA** is ```T1JJ3T3L2```
|
||||
2. **TokenB** is ```A1BRTD4JD```
|
||||
@ -20,6 +30,10 @@ The last part of the URL you're given make up the 3 tokens you need to send noti
|
||||
|
||||
### Syntax
|
||||
Valid syntaxes are as follows:
|
||||
* **slack**://**{tokenA}**/**{tokenB}**/**{tokenC}**
|
||||
* https://hooks.slack.com/services/**{tokenA}**/**{tokenB}**/**{tokenC}**
|
||||
|
||||
Now if you're using the legacy webhook method (and not going through the App), you're granted a bit more freedom. As a result, the following URLs will also work for you through Apprise:
|
||||
* **slack**://**{tokenA}**/**{tokenB}**/**{tokenC}**/**#{channel}**
|
||||
* **slack**://**{tokenA}**/**{tokenB}**/**{tokenC}**/**#{channel1}**/**#{channel2}**/**#{channelN}**
|
||||
* **slack**://**{botname}**@**{tokenA}**/**{tokenB}**/**{tokenC}**/**#{channel}**
|
||||
|
Loading…
Reference in New Issue
Block a user