Skip to content

Webhook Format: Telegram

When format is set to telegram, incoming emails are sent to a Telegram chat via the Bot API. This format requires a bot token in the URL and a chat_id option.

  1. Open Telegram and search for @BotFather.
  2. Send /newbot and follow the instructions.
  3. Copy the bot token:
    1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi
  1. Send any message to your bot.
  2. Open https://api.telegram.org/bot{TOKEN}/getUpdates.
  3. Find the chat.id value in the response.
Terminal window
curl 'https://api.echovalue.dev/webhook' \
-H 'x-token: mytoken' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://api.telegram.org/bot1234567890:ABCDEFGHIJKLMN/sendMessage",
"format": "telegram",
"options": {
"chat_id": "123456789"
}
}'
<b>Subject line</b>
From: Sender Name <sender@example.com>
Email body text