Skip to main content
type: telegram sends a message through the Telegram Bot API.

Options

Plus the common fields (name, onSuccess, onFailure).

Set up a bot

1

Create the bot

Open @BotFather in Telegram, send /newbot, and follow the prompts. BotFather replies with the bot token — store it in an environment variable and reference it with env:.
2

Add the bot to the chat

For a group or channel, add the bot as a member first. The bot cannot post to a chat it is not in.
3

Find the chat ID

Send any message in the target chat, then open https://api.telegram.org/bot<TOKEN>/getUpdates in a browser. The chat.id field in the response is your chat ID. Group IDs are negative numbers.

Example

snapr.yaml
Quote the chatId value. Group IDs start with -, and YAML would otherwise parse the value as a number.