Telegram Trigger
Triggers a workflow on Telegram bot updates (messages, callback queries, edits, inline queries, etc.). Calls the Bot API's setWebhook automatically on publish.
Requires a Telegram connection with a valid bot token.
Configuration
| Field | Description | Notes |
|---|---|---|
| Connection | Telegram connection (bot token) | Required |
One Webhook per Bot
Telegram supports only ONE webhook per bot. Publishing this workflow REPLACES any other webhook currently registered for the bot — including webhooks set by other workflows or external services.
Output
The trigger passes the full Telegram update payload to downstream nodes. Common fields:
| Field | Description |
|---|---|
body.update_id | Unique update identifier |
body.message | A Message object — present for text/photo/etc. updates |
body.callback_query | Inline button callback — present when a user taps an inline keyboard button |
body.edited_message | Edited-message updates |
body.inline_query | Inline-mode query |
headers.X-Telegram-Bot-Api-Secret-Token | Secret token (already verified before the workflow runs) |
How It Works
- On publish, the backend calls
setWebhookwith your workflow's public URL and a randomly generated 32-byte hexsecret_token. - Telegram sends every update via POST to that URL with the
X-Telegram-Bot-Api-Secret-Tokenheader set to that secret. - Every delivery is verified by direct constant-time string comparison against the stored secret. Mismatches return
401 Unauthorized. - On unpublish/delete, the backend calls
deleteWebhookto clean up.
TIP
If a different system needs the same bot's webhook, you'll need to switch the bot to long-polling there, or use a separate bot token for the workflow.