Skip to content

Telegram

Send messages to Telegram users, groups, and channels through Sendivent.

Setup

Connect a Telegram bot to enable Telegram notifications.

  1. Open @BotFather in Telegram
  2. Send /newbot and follow the prompts to create a bot
  3. Copy the bot token (looks like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11)
  4. Go to Channels → Telegram in your Sendivent dashboard
  5. Paste the bot token and save

Sendivent verifies the token by calling the Telegram API. If verification fails, double-check the token from BotFather.

Identifiers

Send to individual users (DMs) or groups/channels:

TypeFormatExample
User (DM)Numeric chat ID123456789
User (DM)@username@johndoe
Group/ChannelNegative chat ID-1001234567890
Channel@username@my_channel

Finding a user's chat ID

Users must start a conversation with your bot first — Telegram bots cannot initiate DMs with users who haven't messaged the bot.

Once a user messages your bot, their chat ID is available in the message payload. Common approaches:

  1. Have the user send /start to your bot
  2. Use a Telegram bot like @userinfobot — forward a message to get the sender's ID

Sending to groups and channels

  1. Add your bot to the group or channel as an admin
  2. Use the group/channel's numeric chat ID (negative number) or @username

For private groups, the bot must be a member. For public channels, use the @username.

Message format

Telegram messages use MarkdownV2 formatting:

SyntaxResult
*bold*bold
_italic_italic
`code`code
[text](url)clickable link

Special characters (. - ( ) ! > #) must be escaped with \ in MarkdownV2. Sendivent handles this automatically for template variables.

Troubleshooting

Message not delivered

  1. Check bot connection in Channels → Telegram
  2. Verify the user has started a conversation with your bot (/start)
  3. Check the chat ID format — user IDs are positive numbers, group IDs are negative

Bot was blocked by the user

The user blocked your bot. The delivery will fail with a 403 error. The user must unblock the bot in Telegram to receive messages again.

Chat not found

  • Verify the chat ID is correct
  • For groups: ensure the bot is a member
  • For channels: ensure the bot is an admin

Invalid bot token

Regenerate the token via @BotFather (/revoke) and update it in your dashboard.

See also

  • Routing — Force Telegram vs auto-routing
  • Deliveries — Statuses and failure reasons
  • Templates — Dynamic content with Handlebars

Released under the MIT License.