๐ค 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โ
- Open Telegram and search for
@BotFather - Send
/newbot - Choose a display name (e.g. "Acme Support")
- Choose a username ending in
bot(e.g.acmesupport_bot) - BotFather replies with your Bot Token
2. Add the Channel in PulseHubโ
- Go to Channels โ Add Channel
- Select Telegram
- Paste your Bot Token
- Click Save Channel
- 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
200response within 60 seconds
Common Issuesโ
| Symptom | Likely Cause |
|---|---|
| Webhook not set | URL must be HTTPS with a valid certificate |
| Bot doesn't respond | Check that telegram_chat_id is in contacts.external_ids |
| Old messages re-delivered | Normal on webhook re-registration |