Skip to content

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 ​

FieldDescriptionNotes
ConnectionTelegram 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:

FieldDescription
body.update_idUnique update identifier
body.messageA Message object — present for text/photo/etc. updates
body.callback_queryInline button callback — present when a user taps an inline keyboard button
body.edited_messageEdited-message updates
body.inline_queryInline-mode query
headers.X-Telegram-Bot-Api-Secret-TokenSecret token (already verified before the workflow runs)

How It Works ​

  1. On publish, the backend calls setWebhook with your workflow's public URL and a randomly generated 32-byte hex secret_token.
  2. Telegram sends every update via POST to that URL with the X-Telegram-Bot-Api-Secret-Token header set to that secret.
  3. Every delivery is verified by direct constant-time string comparison against the stored secret. Mismatches return 401 Unauthorized.
  4. On unpublish/delete, the backend calls deleteWebhook to 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.