Notification Hub: WebHook Examples
Part of Notification Hub.
Send messages to a Telegram chat via Bot API.
Prerequisites:
- Open Telegram and search for @BotFather
- Send
/newbotand follow the instructions to get your bot token - Send any message to your bot, then open in a browser:
https://api.telegram.org/bot<TOKEN>/getUpdates
- Find
"chat":{"id": 123456789}: that number is your chat_id
Configuration:
| Field | Value |
|---|---|
| URL | https://api.telegram.org/bot<YOUR_BOT_TOKEN>/sendMessage |
| Method | Post |
| Body Type | Json |
| Auth: Type | None |
Body:
{ "chat_id": "YOUR_CHAT_ID", "text": "%subject%\n\n%body%"}The message is sent as plain text. Do not add parse_mode: "HTML": the placeholders are not escaped for HTML, so a < or & in a notification would be read as markup.
Send messages to a Teams channel via Incoming Webhook.
Prerequisites:
- In Teams open the channel → … → Connectors
- Add Incoming Webhook, set a name and copy the generated URL
Microsoft is migrating Teams connectors to Power Automate workflows. If the classic connector is unavailable, create a workflow in Teams with an HTTP trigger and use that URL instead.
Configuration:
| Field | Value |
|---|---|
| URL | https://outlook.office.com/webhook/<YOUR_WEBHOOK_URL> |
| Method | Post |
| Body Type | Json |
| Auth: Type | None |
Body:
{ "@type": "MessageCard", "@context": "http://schema.org/extensions", "summary": "%subject%", "themeColor": "0076D7", "sections": [ { "activityTitle": "%subject%", "activityText": "%body%" } ]}Send messages to a Slack channel via Incoming Webhook.
Prerequisites:
- Go to api.slack.com/apps → Create App → Incoming Webhooks
- Activate and copy the Webhook URL
Configuration:
| Field | Value |
|---|---|
| URL | https://hooks.slack.com/services/YOUR/WEBHOOK/URL |
| Method | Post |
| Body Type | Json |
| Auth: Type | None |
Body:
{ "text": "*%subject%*\n%body%"}