Updated Notify_msteams (markdown)

master
Chris Caron 2021-02-23 13:47:44 -05:00
parent 6ea753087d
commit 17c49dcd7d
1 changed files with 24 additions and 8 deletions

@ -11,20 +11,31 @@ You will need to create an **Incoming Webhook** to attach Apprise. This can be
When you've completed this, it will generate you a URL that looks like: When you've completed this, it will generate you a URL that looks like:
``` ```
https://outlook.office.com/webhook/ \ https://team-name.office.com/webhook/ \
abcdefgf8-2f4b-4eca-8f61-225c83db1967@abcdefg2-5a99-4849-8efc-\ abcdefgf8-2f4b-4eca-8f61-225c83db1967@abcdefg2-5a99-4849-8efc-\
c9e78d28e57d/IncomingWebhook/291289f63a8abd3593e834af4d79f9fe/\ c9e78d28e57d/IncomingWebhook/291289f63a8abd3593e834af4d79f9fe/\
a2329f43-0ffb-46ab-948b-c9abdad9d643 a2329f43-0ffb-46ab-948b-c9abdad9d643
``` ```
Yes... The URL is that big... but at the end of the day this effectively equates to: Yes... The URL is that big... but at the end of the day this effectively equates to:
```https://outlook.office.com/webhook/{tokenA}/IncomingWebhook/{tokenB}/{tokenC}``` ```https://{team}.office.com/webhook/{tokenA}/IncomingWebhook/{tokenB}/{tokenC}```
Hence: Hence:
The team name can be found in the generated webhook which looks like:
``` ```
https://outlook.office.com/webhook/ABCD@WXYZ/IncomingWebhook/DEFG/HIJK # https://TEAM-NAME.office.com/webhook/ABCD/IncomingWebhook/DEFG/HIJK
^ ^ ^ # ^ ^ ^ ^
| | | # | | | |
These are important <----------------^----------------------^----^ # These are important <----------------^--------------------^----^
```
vs the legacy URL which looked like (always stating `outlook` as the team name):
```
# https://outlook.office.com/webhook/ABCD/IncomingWebhook/DEFG/HIJK
# ^ ^ ^ ^
# | | | |
# legacy team reference: 'outlook' | | |
# | | |
# These are important <--------------^--------------------^----^
``` ```
So as you can see, we have is 3 separate tokens. These are what you need to build your apprise URL with. In the above example the tokens are as follows: So as you can see, we have is 3 separate tokens. These are what you need to build your apprise URL with. In the above example the tokens are as follows:
@ -36,12 +47,16 @@ So as you can see, we have is 3 separate tokens. These are what you need to bui
### Syntax ### Syntax
Valid syntax is as follows: Valid syntax is as follows:
* `https://outlook.office.com/webhook/{tokenA}/IncomingWebhook/{tokenB}/{tokenC}` * `https://team-name.office.com/webhook/{tokenA}/IncomingWebhook/{tokenB}/{tokenC}`
* `msteams://{team}/{tokenA}/{tokenB}/{tokenC}/`
The Legacy format is also still supported. The below URL would automatically set the team name to `outlook`
* `msteams://{tokenA}/{tokenB}/{tokenC}/` * `msteams://{tokenA}/{tokenB}/{tokenC}/`
### Parameter Breakdown ### Parameter Breakdown
| Variable | Required | Description | Variable | Required | Description
| ----------- | -------- | ----------- | ----------- | -------- | -----------
| team | Yes | Extracted from the *incoming-webhook*.
| tokenA | Yes | The first part of 3 tokens provided to you after creating a *incoming-webhook* | tokenA | Yes | The first part of 3 tokens provided to you after creating a *incoming-webhook*
| tokenB | Yes | The second part of 3 tokens provided to you after creating a *incoming-webhook* | tokenB | Yes | The second part of 3 tokens provided to you after creating a *incoming-webhook*
| tokenC | Yes | The last part of 3 tokens provided to you after creating a *incoming-webhook* | tokenC | Yes | The last part of 3 tokens provided to you after creating a *incoming-webhook*
@ -50,11 +65,12 @@ Valid syntax is as follows:
#### Example #### Example
Send a Microsoft Teams notification: Send a Microsoft Teams notification:
```bash ```bash
# Assuming our {team} is Apprise
# Assuming our {tokenA} is T1JJ3T3L2@DEFK543 # Assuming our {tokenA} is T1JJ3T3L2@DEFK543
# Assuming our {tokenB} is A1BRTD4JD # Assuming our {tokenB} is A1BRTD4JD
# Assuming our {tokenC} is TIiajkdnlazkcOXrIdevi7F # Assuming our {tokenC} is TIiajkdnlazkcOXrIdevi7F
apprise -vv -t "Test Message Title" -b "Test Message Body" \ apprise -vv -t "Test Message Title" -b "Test Message Body" \
msteams:///T1JJ3T3L2@DEFK543/A1BRTD4JD/TIiajkdnlazkcOXrIdevi7F/ msteams:///Apprise/T1JJ3T3L2@DEFK543/A1BRTD4JD/TIiajkdnlazkcOXrIdevi7F/
``` ```
## Templating ## Templating