Destination type

Telegram Message Destination

Use Telegram Message destinations when routed events should become operational chat alerts in Telegram groups, channels, or direct bot chats.

TELEGRAM_MESSAGETelegram Bot API sendMessagePOSTCommunication
Telegram Message destination delivery flowFastHook routes accepted events through a connection to a Telegram Message destination and stores delivery attempt evidence.AcceptedRequestsource verifiedConnectionRoute branchfilters and transformsretry policyTELEGRAM_MESSAGETelegram MessageTelegram Bot API sendMessagePOSTAttemptEvidencestatus + bodyDestination config owns target, auth, method, rate limit, disabled state, and delivery attempt evidence.
For Telegram Message destinations, FastHook renders message templates, sends through Telegram Bot API sendMessage, and stores the Telegram API response as delivery attempt evidence.

When to use this destination type

Choose TELEGRAM_MESSAGE when the receiver target is Telegram Bot API sendMessage. Destinations are outbound delivery targets: they do not decide whether a source request should be accepted, and they do not own connection filters or transformations. They own where the final delivery goes and how FastHook should authenticate, pace, disable, and inspect that delivery.

A destination can be reused by multiple connections when several source branches should feed the same receiver. Reuse keeps receiver capacity, credentials, and attempt evidence attached to one destination id.

FastHook dashboard fields

In the dashboard, create a destination, set Destination Type to TELEGRAM_MESSAGE, then fill the fields below.

Chat ID

Numeric chat ID, @channelusername, or a template value that renders to a Telegram chat target.

Message text

Telegram message template with FastHook tokens such as {{event_id}} and {{payload.customer.email}}.

Parse mode

Optional formatting mode when the rendered template uses Telegram-supported HTML or Markdown.

Disable link previews

Controls Telegram link preview generation for rendered messages.

Silent notification

Controls whether Telegram notifies recipients silently.

Bot token

Telegram bot token from BotFather. Treat it as a secret and rotate it if exposed.

Max delivery rate

Built-in one message per second pacing.

API config fields

The REST API stores destination-specific behavior under config. Use PATCH for focused edits and PUT only when your request contains the full config you want to keep.

config.chat_id

Required Telegram chat ID, channel username such as @ops_alerts, or a FastHook template that renders to a chat ID.

config.text_template

Required Telegram message text template. FastHook renders metadata and payload tokens before sending.

config.parse_mode

Optional Telegram parse mode: HTML, MarkdownV2, or Markdown.

config.disable_web_page_preview

Optional boolean for suppressing link previews. Defaults to true.

config.disable_notification

Optional boolean for sending silent notifications. Defaults to false.

config.auth_type

TELEGRAM_BOT_TOKEN.

config.auth.bot_token

Telegram bot token used in the Bot API sendMessage request.

config.rate_limit

Built-in delivery pacing for Telegram messages. Telegram Message destinations are fixed at 1.

config.rate_limit_period

Rate-limit period. Telegram Message destinations are fixed at second.

Telegram Message destination config
{
  "name": "ops-telegram-alerts",
  "type": "TELEGRAM_MESSAGE",
  "config": {
    "chat_id": "@ops_alerts",
    "text_template": "FastHook event {{event_id}}\n{{payload}}",
    "parse_mode": null,
    "disable_web_page_preview": true,
    "disable_notification": false,
    "auth_type": "TELEGRAM_BOT_TOKEN",
    "auth": {
      "bot_token": "123456789:your-telegram-bot-token"
    },
    "rate_limit": 1,
    "rate_limit_period": "second"
  }
}
Create Telegram Message destination with cURL
curl -X POST "https://api.fasthook.io/v1/destinations" \
  -H "Authorization: Bearer $FASTHOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "ops-telegram-alerts",
  "type": "TELEGRAM_MESSAGE",
  "config": {
    "chat_id": "@ops_alerts",
    "text_template": "FastHook event {{event_id}}\n{{payload}}",
    "parse_mode": null,
    "disable_web_page_preview": true,
    "disable_notification": false,
    "auth_type": "TELEGRAM_BOT_TOKEN",
    "auth": {
      "bot_token": "123456789:your-telegram-bot-token"
    },
    "rate_limit": 1,
    "rate_limit_period": "second"
  }
}'

Authentication

Destination authentication is outbound. It helps the receiver trust or accept FastHook delivery, and it is separate from source authentication that verifies the original webhook producer.

  • Telegram bot token from BotFather
  • Bot membership in the target chat, group, supergroup, or channel

HTTP methods and rate limit

This destination type uses the methods below for delivery attempts. Rate limits apply at the destination boundary, so every connection that targets the same destination shares that capacity.

POST

Rate limit: Locked to 1 request per second.

Delivery behavior

  • FastHook renders Telegram message templates per delivery and calls Telegram Bot API sendMessage.
  • For groups, supergroups, and channels, add the bot to the target chat before sending. For channels, make the bot an administrator that can post messages.
  • Use numeric chat IDs for private groups and supergroups; public channels can use @channelusername.
  • Telegram Bot API responses with ok: false are treated as failed delivery attempts even when Telegram returns HTTP 200.
  • Telegram Message destinations are locked to 1 request per second to avoid message bursts.

Setup checklist

  1. Create a bot in BotFather and copy the bot token.
  2. Add the bot to the Telegram chat, group, supergroup, or channel that should receive messages.
  3. For channels, make the bot an administrator with permission to post messages.
  4. Create a FastHook destination and choose TELEGRAM_MESSAGE as the destination type.
  5. Set Chat ID, Message text, optional parse mode, notification flags, and bot token.
  6. Connect only Telegram-worthy events through filters before routing to the destination.

Troubleshooting

Attempts fail with chat not found.

Confirm config.chat_id, add the bot to the target chat, and use a numeric chat ID for private groups or supergroups.

Attempts fail with bot was blocked by the user.

The recipient must start or unblock the bot before direct messages can be delivered.

Attempts fail with not enough rights to send messages.

Add the bot to the channel or group and grant the required posting permission.

Attempts fail after adding parse mode.

Check that the rendered message is valid for the selected Telegram parse mode, especially MarkdownV2 escaping.

Attempts fail with authentication errors.

Check config.auth.bot_token and rotate the token in BotFather if it was exposed or revoked.

Related docs