Telegram Advanced Trigger icon

Telegram Advanced Trigger

Starts the workflow on a Telegram update

Overview

This node acts as a Telegram Advanced Trigger that starts an n8n workflow based on various Telegram updates. It listens for specific types of Telegram events such as messages, callback queries, channel posts, inline queries, polls, and checkout or shipping queries. The node is useful for automating responses or processing data from Telegram bots in real-time, for example, triggering workflows 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 or photo is received in a Telegram chat.
  2. Start a workflow when a user sends a callback query to the bot.
  3. Automate processing of shipping queries or pre-checkout queries for Telegram bot-based e-commerce.

Properties

Name Meaning
Trigger On Specifies which types of Telegram updates will trigger the workflow. Multiple update types can be selected, such as messages, callback queries, channel posts, inline queries, polls, and more.
Download Images/Files If enabled, the node downloads images or files sent in the update. The image size can be selected (small, medium, large, extra large). By default, only the large image is downloaded.
Restrict to Chat IDs Restricts the trigger to only fire for updates from specified chat IDs, which can be provided as a comma-separated list.
Restrict to User IDs Restricts the trigger to only fire for updates from specified user IDs, which can be provided as a comma-separated list.

Output

JSON

  • update_type - The type of Telegram update received, e.g., message, callback_query, poll, etc.
  • update_data - The full JSON payload of the Telegram update received, containing all details of the event.

Dependencies

  • Requires Telegram API credentials (an API key token) to authenticate and receive updates.

Troubleshooting

  • Ensure only one Telegram trigger node is active 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 reject the request with a 403 error.
  • When restricting by chat or user IDs, ensure the IDs are correctly formatted and match the IDs in incoming updates to avoid missing triggers.
  • Downloading images/files requires proper handling of file sizes; selecting an unsupported size may result in no file being downloaded.

Links

Discussion