Chat notifications
Send a message to Slack, Microsoft Teams, Discord, Telegram or Google Chat from a script, as plain text or with a title, fields and a link button, or in the native format of the service. The webhook URL or the token stays in an environment variable of the server, the limits of each service are checked before sending, and dry_run shows the exact message without sending. Typical uses: warn a team when a job fails, post a daily report in a channel.
notify slack <text> <json_params>
Description
Send a message to Slack, with an incoming webhook (webhook_url) or a bot token and chat.postMessage (token and channel). Parameters: webhook_url or token, channel (with token), blocks (Block Kit, a JSON array; text is then the text of the notification), title, fields (a JSON object {"label": "value"} or an array of {name, value}, 25 at most), link_url and link_text (a button or a link; link_text is Open by default), thread_ts (reply in a thread), unfurl_links, api_base (https://slack.com or a local test server), timeout_ms (15000, 100 to 120000), dry_run (false: true sends nothing, reads no secret, and gives the exact JSON that would be sent with its size). Result: {service, sent, status, host, bytes}, with channel and ts for a bot
Send a message to Slack, with an incoming webhook (webhook_url) or a bot token and chat.postMessage (token and channel). Parameters: webhook_url or token, channel (with token), blocks (Block Kit, a JSON array; text is then the text of the notification), title, fields (a JSON object {"label": "value"} or an array of {name, value}, 25 at most), link_url and link_text (a button or a link; link_text is Open by default), thread_ts (reply in a thread), unfurl_links, api_base (https://slack.com or a local test server), timeout_ms (15000, 100 to 120000), dry_run (false: true sends nothing, reads no secret, and gives the exact JSON that would be sent with its size). Result: {service, sent, status, host, bytes}, with channel and ts for a bot
Parameters
text: The text of the message. A text without any real line break may use the two characters \n between its lines - String - required
json_params: The parameters - String - required
text: The text of the message. A text without any real line break may use the two characters \n between its lines - String - required
json_params: The parameters - String - required
admin
notify slack "Disk almost full on db-01" "{\"title\": \"Disk alert\", \"fields\": {\"Host\": \"db-01\", \"Used\": \"93 %\"}, \"link_url\": \"https://grafana.example.org/d/disk\", \"link_text\": \"Open dashboard\", \"dry_run\": true}"
mentdb
{"service": "slack", "dry_run": true, "target": "incoming webhook", "bytes": 531, "payload": {"text": "Disk alert: Disk almost full on db-01", "blocks": [{"type": "header", "text": {"type": "plain_text", "text": "Disk alert", "emoji": true}}, {"type": "section", "text": {"type": "mrkdwn", "text": "Disk almost full on db-01"}}, {"type": "section", "fields": [{"type": "mrkdwn", "text": "*Host*\ db-01"}, {"type": "mrkdwn", "text": "*Used*\ 93 %"}]}, {"type": "actions", "elements": [{"type": "button", "text": {"type": "plain_text", "text": "Open dashboard", "emoji": true}, "url": "https://grafana.example.org/d/disk"}]}]}}
dry_run: your own blocks, with a fallback text
admin
notify slack "Hello world" "{\"blocks\": [{\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \"Hello *world*\"}}], \"dry_run\": true}"
mentdb
{"service": "slack", "dry_run": true, "target": "incoming webhook", "bytes": 109, "payload": {"text": "Hello world", "blocks": [{"type": "section", "text": {"type": "mrkdwn", "text": "Hello *world*"}}]}}
blocks and the helper together are refused
admin
notify slack "Hello" "{\"blocks\": [{\"type\": \"divider\"}], \"title\": \"Hi\", \"dry_run\": true}"
mentdb
ERROR: Sorry, an error appears (give blocks, or title, fields and link_url, not both).
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): a webhook; the URL is in the variable SLACK_WEBHOOK_URL of the server
admin
notify slack "Backup *done* in 4 min" "{\"webhook_url\": \"slack_webhook_url\"}"
mentdb
{"service": "slack", "sent": true, "status": 200, "host": "127.0.0.1:37101", "bytes": 34}
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): title, fields and a button
admin
notify slack "Disk almost full on db-01" "{\"webhook_url\": \"slack_webhook_url\", \"title\": \"Disk alert\", \"fields\": {\"Host\": \"db-01\", \"Used\": \"93 %\"}, \"link_url\": \"https://grafana.example.org/d/disk\", \"link_text\": \"Open dashboard\"}"
mentdb
{"service": "slack", "sent": true, "status": 200, "host": "127.0.0.1:37101", "bytes": 531}
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): a bot token: the answer gives the channel and the time stamp of the message
admin
notify slack "Deploy of v4.2 finished" "{\"token\": \"slack_bot_token\", \"channel\": \"#ops\", \"api_base\": \"http://127.0.0.1:37101\"}"
mentdb
{"service": "slack", "sent": true, "status": 200, "host": "127.0.0.1:37101", "bytes": 54, "channel": "C0123456789", "ts": "1700000000.000100"}
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): rate limited
admin
notify slack "x" "{\"webhook_url\": \"slack_webhook_rate_limited\"}"
mentdb
Sorry, an error appears (notify slack: rate limited by 127.0.0.1:37101 (HTTP 429): retry after 30 seconds (rate_limited)).
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): a deleted webhook
admin
notify slack "x" "{\"webhook_url\": \"slack_webhook_deleted\"}"
mentdb
Sorry, an error appears (notify slack: HTTP 404 from 127.0.0.1:37101 (not found: the webhook, the bot or the chat does not exist (any more)) (channel_not_found)).
Used in use cases (1 recipe)
System administrator & DevOps › Warn the team on Slack and Teams when disks are almost full
System administrator & DevOps › Warn the team on Slack and Teams when disks are almost full
notify teams <text> <json_params>
Description
Send a message to a Microsoft Teams channel or chat through a Workflows webhook (Power Automate), as an Adaptive Card. Parameters: webhook_url, card (your own Adaptive Card, a JSON object with type AdaptiveCard; text must then be empty), title, fields (a JSON object {"label": "value"} or an array of {name, value}, 25 at most), link_url and link_text (a button or a link; link_text is Open by default), timeout_ms (15000, 100 to 120000), dry_run (false: true sends nothing, reads no secret, and gives the exact JSON that would be sent with its size). Result: {service, sent, status, host, bytes, accepted}
Send a message to a Microsoft Teams channel or chat through a Workflows webhook (Power Automate), as an Adaptive Card. Parameters: webhook_url, card (your own Adaptive Card, a JSON object with type AdaptiveCard; text must then be empty), title, fields (a JSON object {"label": "value"} or an array of {name, value}, 25 at most), link_url and link_text (a button or a link; link_text is Open by default), timeout_ms (15000, 100 to 120000), dry_run (false: true sends nothing, reads no secret, and gives the exact JSON that would be sent with its size). Result: {service, sent, status, host, bytes, accepted}
Parameters
text: The text of the message. A text without any real line break may use the two characters \n between its lines - String - required
json_params: The parameters - String - required
text: The text of the message. A text without any real line break may use the two characters \n between its lines - String - required
json_params: The parameters - String - required
admin
notify teams "Nightly import: 1200 rows" "{\"title\": \"Import OK\", \"fields\": {\"Rows\": 1200, \"Duration\": \"35 s\"}, \"link_url\": \"https://example.org/report\", \"dry_run\": true}"
mentdb
{"service": "teams", "dry_run": true, "target": "workflow webhook", "bytes": 619, "payload": {"type": "message", "attachments": [{"contentType": "application/vnd.microsoft.card.adaptive", "contentUrl": null, "content": {"$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.4", "body": [{"type": "TextBlock", "text": "Import OK", "wrap": true, "weight": "Bolder", "size": "Medium"}, {"type": "TextBlock", "text": "Nightly import: 1200 rows", "wrap": true}, {"type": "FactSet", "facts": [{"title": "Rows", "value": "1200"}, {"title": "Duration", "value": "35 s"}]}], "actions": [{"type": "Action.OpenUrl", "title": "Open", "url": "https://example.org/report"}]}}]}}
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): a workflow webhook answers 202
admin
notify teams "Nightly import: 1200 rows" "{\"webhook_url\": \"teams_workflow_url\", \"title\": \"Import OK\", \"fields\": {\"Rows\": 1200, \"Duration\": \"35 s\"}, \"link_url\": \"https://example.org/report\"}"
mentdb
{"service": "teams", "sent": true, "status": 202, "host": "127.0.0.1:37101", "bytes": 619, "accepted": true}
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): an old Office 365 connector URL is refused
admin
notify teams "x" "{\"webhook_url\": \"teams_old_connector_url\"}"
mentdb
Sorry, an error appears (the webhook URL in 'webhook_url' is an Office 365 connector URL: these connectors of Teams were retired in May 2026. Create a webhook with the Workflows app of Teams and use its URL).
Used in use cases (1 recipe)
System administrator & DevOps › Warn the team on Slack and Teams when disks are almost full
System administrator & DevOps › Warn the team on Slack and Teams when disks are almost full
notify discord <text> <json_params>
Description
Send a message to a Discord channel with a webhook. Parameters: webhook_url, embeds (a JSON array of embeds), title, fields (a JSON object {"label": "value"} or an array of {name, value}, 25 at most), link_url and link_text (a button or a link; link_text is Open by default) (an embed; link_url is the link of the title), color (#RRGGBB of that embed), username, avatar_url, thread_id (a thread of a forum or text channel), allow_mentions (false: @everyone, roles and users are never pinged), timeout_ms (15000, 100 to 120000), dry_run (false: true sends nothing, reads no secret, and gives the exact JSON that would be sent with its size). Result: {service, sent, status, host, bytes, message_id, channel_id}
Send a message to a Discord channel with a webhook. Parameters: webhook_url, embeds (a JSON array of embeds), title, fields (a JSON object {"label": "value"} or an array of {name, value}, 25 at most), link_url and link_text (a button or a link; link_text is Open by default) (an embed; link_url is the link of the title), color (#RRGGBB of that embed), username, avatar_url, thread_id (a thread of a forum or text channel), allow_mentions (false: @everyone, roles and users are never pinged), timeout_ms (15000, 100 to 120000), dry_run (false: true sends nothing, reads no secret, and gives the exact JSON that would be sent with its size). Result: {service, sent, status, host, bytes, message_id, channel_id}
Parameters
text: The text of the message. A text without any real line break may use the two characters \n between its lines - String - required
json_params: The parameters - String - required
text: The text of the message. A text without any real line break may use the two characters \n between its lines - String - required
json_params: The parameters - String - required
admin
notify discord "Build 512 passed @everyone" "{\"username\": \"CI\", \"dry_run\": true}"
mentdb
{"service": "discord", "dry_run": true, "target": "webhook", "bytes": 94, "payload": {"content": "Build 512 passed @everyone", "username": "CI", "allowed_mentions": {"parse": []}}}
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): an embed with fields
admin
notify discord "Temperature over the limit" "{\"webhook_url\": \"discord_webhook_url\", \"title\": \"Cold room 2\", \"fields\": {\"Now\": \"7.5 C\", \"Limit\": \"5 C\"}, \"link_url\": \"https://example.org/sensors/2\", \"color\": \"#E01E5A\"}"
mentdb
{"service": "discord", "sent": true, "status": 200, "host": "127.0.0.1:37101", "bytes": 291, "message_id": "1300000000000000001", "channel_id": "1200000000000000002"}
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): rate limited: retry_after of the answer
admin
notify discord "x" "{\"webhook_url\": \"discord_webhook_rate_limited\"}"
mentdb
Sorry, an error appears (notify discord: rate limited by 127.0.0.1:37101 (HTTP 429): retry after 2 seconds (You are being rate limited.)).
notify telegram <text> <json_params>
Description
Send a message with a Telegram bot (Bot API sendMessage). Parameters: token (the bot token, 123456:ABC...), chat_id (required: a number such as -1001234567890 or @channelname), parse_mode (none, HTML, MarkdownV2 or Markdown; you escape the text yourself), title, fields (a JSON object {"label": "value"} or an array of {name, value}, 25 at most), link_url and link_text (a button or a link; link_text is Open by default) (an HTML message, the values escaped), disable_notification, disable_preview, protect_content, thread_id (a topic of a forum), api_base (https://api.telegram.org or a local Bot API server), timeout_ms (15000, 100 to 120000), dry_run (false: true sends nothing, reads no secret, and gives the exact JSON that would be sent with its size). Result: {service, sent, status, host, bytes, message_id, chat_id}
Send a message with a Telegram bot (Bot API sendMessage). Parameters: token (the bot token, 123456:ABC...), chat_id (required: a number such as -1001234567890 or @channelname), parse_mode (none, HTML, MarkdownV2 or Markdown; you escape the text yourself), title, fields (a JSON object {"label": "value"} or an array of {name, value}, 25 at most), link_url and link_text (a button or a link; link_text is Open by default) (an HTML message, the values escaped), disable_notification, disable_preview, protect_content, thread_id (a topic of a forum), api_base (https://api.telegram.org or a local Bot API server), timeout_ms (15000, 100 to 120000), dry_run (false: true sends nothing, reads no secret, and gives the exact JSON that would be sent with its size). Result: {service, sent, status, host, bytes, message_id, chat_id}
Parameters
text: The text of the message. A text without any real line break may use the two characters \n between its lines - String - required
json_params: The parameters - String - required
text: The text of the message. A text without any real line break may use the two characters \n between its lines - String - required
json_params: The parameters - String - required
admin
notify telegram "Stock low" "{\"chat_id\": \"@ops_alerts\", \"title\": \"Shop <Paris>\", \"fields\": {\"Item\": \"A&B\", \"Left\": 3}, \"link_url\": \"https://example.org/stock\", \"disable_preview\": true, \"dry_run\": true}"
mentdb
{"service": "telegram", "dry_run": true, "target": "sendMessage", "bytes": 229, "payload": {"chat_id": "@ops_alerts", "text": "<b>Shop <Paris></b>\ Stock low\ <b>Item:</b> A&B\ <b>Left:</b> 3\ <a href=\"https://example.org/stock\">Open</a>", "parse_mode": "HTML", "link_preview_options": {"is_disabled": true}}}
A chat_id is required
admin
notify telegram "x" "{\"token\": \"telegram_bot_token\"}"
mentdb
ERROR: Sorry, an error appears (the parameter 'chat_id' is required (a number such as -1001234567890, or @channelname)).
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): a message to a group
admin
notify telegram "Server db-01 is back" "{\"token\": \"telegram_bot_token\", \"chat_id\": -1001234567890, \"api_base\": \"http://127.0.0.1:37101\"}"
mentdb
{"service": "telegram", "sent": true, "status": 200, "host": "127.0.0.1:37101", "bytes": 59, "message_id": 42, "chat_id": -1001234567890}
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): an unknown chat
admin
notify telegram "x" "{\"token\": \"telegram_bot_token\", \"chat_id\": 0, \"api_base\": \"http://127.0.0.1:37101\"}"
mentdb
Sorry, an error appears (notify telegram: HTTP 400 from 127.0.0.1:37101 (the service refused the message) (Bad Request: chat not found)).
notify google_chat <text> <json_params>
Description
Send a message to a Google Chat space with an incoming webhook. Parameters: webhook_url, cards_v2 (a JSON array of cards), title, fields (a JSON object {"label": "value"} or an array of {name, value}, 25 at most), link_url and link_text (a button or a link; link_text is Open by default) (a text with *bold* labels and links; the title and the fields are escaped, the text is sent as it is), thread_key (messages with the same key go in the same thread), timeout_ms (15000, 100 to 120000), dry_run (false: true sends nothing, reads no secret, and gives the exact JSON that would be sent with its size). Result: {service, sent, status, host, bytes, name, thread}
Send a message to a Google Chat space with an incoming webhook. Parameters: webhook_url, cards_v2 (a JSON array of cards), title, fields (a JSON object {"label": "value"} or an array of {name, value}, 25 at most), link_url and link_text (a button or a link; link_text is Open by default) (a text with *bold* labels and
Parameters
text: The text of the message. A text without any real line break may use the two characters \n between its lines - String - required
json_params: The parameters - String - required
text: The text of the message. A text without any real line break may use the two characters \n between its lines - String - required
json_params: The parameters - String - required
admin
notify google_chat "Payment batch sent" "{\"title\": \"SEPA\", \"fields\": {\"Count\": 12}, \"link_url\": \"https://example.org/b/1\", \"dry_run\": true}"
mentdb
{"service": "google_chat", "dry_run": true, "target": "incoming webhook", "bytes": 83, "payload": {"text": "*SEPA*\ Payment batch sent\ *Count:* 12\ <https://example.org/b/1|Open>"}}
Fixed result from a real call to a local fake of the service on 127.0.0.1 (the real service was not called): in a thread
admin
notify google_chat "Payment batch sent" "{\"webhook_url\": \"google_chat_webhook_url\", \"title\": \"SEPA\", \"fields\": {\"Count\": 12}, \"thread_key\": \"batch-2026-11\"}"
mentdb
{"service": "google_chat", "sent": true, "status": 200, "host": "127.0.0.1:37101", "bytes": 51, "name": "spaces/AAAA/messages/BBBB", "thread": "spaces/AAAA/threads/CCCC"}
