Skip to main content

๐Ÿค– Telegram Bot

PulseHub connects to Telegram via the Bot API. When users message your Telegram bot, the messages appear in PulseHub.


Prerequisitesโ€‹

A Telegram account and access to @BotFather to create a bot.


Setup Stepsโ€‹

1. Create a Bot with BotFatherโ€‹

  1. Open Telegram and search for @BotFather
  2. Send /newbot
  3. Choose a display name (e.g. "Acme Support")
  4. Choose a username ending in bot (e.g. acmesupport_bot)
  5. BotFather replies with your Bot Token

2. Add the Channel in PulseHubโ€‹

  1. Go to Channels โ†’ Add Channel
  2. Select Telegram
  3. Paste your Bot Token
  4. Click Save Channel
  5. Copy the Webhook URL

3. Register the Webhook with Telegramโ€‹

Open this URL in your browser:

https://api.telegram.org/bot{YOUR_BOT_TOKEN}/setWebhook?url={YOUR_PULSEHUB_WEBHOOK_URL}

Telegram responds with: {"ok": true, "result": true, "description": "Webhook was set"}

4. Testโ€‹

Open your bot in Telegram and send a message. It should appear in PulseHub within seconds.


Telegram's Webhook Requirementsโ€‹

  • The webhook URL must use HTTPS with a valid SSL certificate
  • Telegram expects a 200 response within 60 seconds

Common Issuesโ€‹

SymptomLikely Cause
Webhook not setURL must be HTTPS with a valid certificate
Bot doesn't respondCheck that telegram_chat_id is in contacts.external_ids
Old messages re-deliveredNormal on webhook re-registration