Telegram Trigger
Receives Telegram bot messages and updates and starts workflow execution. Use this to build chatbots and automations that react to Telegram activity.
Use Telegram Trigger when:
- You want to run a workflow when a user sends a message to your bot
- You need to handle bot commands (e.g.,
/start) or inline button callbacks - Telegram is the event source and your workflow runs asynchronously
For sending messages back to users, pair this with Telegram Send Message.
- Create a bot via @BotFather on Telegram and copy the bot token
- Add
TELEGRAM_BOT_TOKENon the Env Vars page - Deploy the workflow to get your trigger URL
- Register the webhook with the Telegram Bot API:
https://api.telegram.org/bot{token}/setWebhook?url=https://triggers.tensorify.io/{teamId}/{path}
Replace {token} with your bot token, {teamId} with your Tensorify team ID, and {path} with your workflow's trigger path.
| Handle | Type | Description |
|---|---|---|
payload | object | Normalized Telegram update payload |
The payload (accessed as {{ telegram.* }}) shape:
| Field | Type | Description |
|---|---|---|
chat_id | number | Chat ID where the update occurred |
from | object | Sender object (id, username, first_name, etc.) |
text | string | Message text content |
message_id | number | Telegram message ID |
date | number | Unix timestamp of the message |
reply_to_message | object | Original message if this is a reply |
update_type | string | Update type (e.g., message, callback_query) |
raw_update | object | Full Telegram update object for advanced use cases |
| Setting | Type | Default | Description |
|---|---|---|---|
update_types | multi-select | message | Update types to listen for: message, edited_message, callback_query, inline_query |
command_filter | string | — | Only trigger for this bot command (e.g., /start). Leave empty to accept all messages. |
mockPayload | JSON | — | Test payload injected during canvas testing. |
| Env Var | Description |
|---|---|
TELEGRAM_BOT_TOKEN | Bot token from @BotFather (format: 123456:ABC-DEF...) |
Handle the /start command and send a welcome message:
- Set
update_typestomessage - Set
command_filterto/start - Add a Telegram Send Message node
- Set Chat ID to
{{ telegram.chat_id }} - Set Message Text to your welcome message
Access update data in downstream nodes:
{{ telegram.from.username }}
{{ telegram.text }}
{{ telegram.chat_id }}
{{ telegram.message_id }}
{{ telegram.update_type }}
- One webhook per bot: Telegram allows only one webhook URL per bot. Deploying a new workflow overwrites the previous webhook registration.
- HTTPS required: Telegram webhooks must use HTTPS. The
triggers.tensorify.ioendpoint satisfies this requirement. - Command filter format: Include the leading slash (e.g.,
/start, notstart). - Chat ID types: Private chat IDs are positive numbers; group chat IDs are negative. Use
{{ telegram.chat_id }}directly when replying.
- Telegram Send Message — send replies and notifications
- Webhook Trigger — generic HTTP webhook receiver
- Deploying Workflows — get your trigger URL and deploy to production
- Environment Variables — store your bot token
