Telegram Trigger

Starts the workflow on a Telegram update

Overview

This node acts as a trigger for Telegram updates, starting a workflow whenever specified types of updates are received from a Telegram bot. It is useful for automating responses or actions based on various Telegram events such as messages, callback queries, channel posts, inline queries, polls, and checkout or shipping queries. For example, it can trigger a workflow when a new message arrives, when a user interacts with an inline query, or when a poll state changes.

Use Case Examples

  1. Trigger a workflow when a new message is received in a Telegram chat to automatically respond or log the message.
  2. Trigger a workflow on callback queries to handle user interactions with inline buttons in Telegram bots.
  3. Trigger a workflow on poll updates to process poll results or notify users when a poll ends.

Properties

Name Meaning
Trigger On Specifies the types of Telegram updates that will trigger the workflow, such as messages, callback queries, channel posts, inline queries, polls, pre-checkout queries, and shipping queries.
Download Images/Files If enabled, the node downloads images or files sent in the update. Telegram delivers images in multiple sizes; the size can be selected with the 'Image Size' property.
Restrict to Chat IDs Restricts the trigger to updates from specific chat IDs. Multiple IDs can be specified, separated by commas.
Restrict to User IDs Restricts the trigger to updates from specific user IDs. Multiple IDs can be specified, separated by commas.

Output

JSON

  • update - The full Telegram update object received from the webhook, containing details about the event that triggered the workflow.

Dependencies

  • Telegram Bot API

Troubleshooting

  • Ensure only one Telegram trigger is used per bot due to Telegram API limitations; otherwise, webhook conflicts may occur.
  • If the secret token in the webhook request does not match the configured secret token, the node will respond with a 403 error and ignore the update.
  • When restricting by chat or user IDs, ensure the IDs are correctly formatted and separated by commas; otherwise, updates may be ignored.
  • If downloading images or files, verify that the Telegram bot has the necessary permissions to access the media.
  • Common error: 'Provided secret is not valid' indicates a mismatch between the webhook secret token and the configured secret token; verify the secret token configuration.

Links

Discussion