Telegram (Poll) icon

Telegram (Poll)

Receive incoming Telegram updates using long polling.

Telegram (Poll)

AI-generated

Summary

Polls incoming Telegram updates using long polling and emits update events filtered by type and optionally by username.

Inputs

  • Limit — Limits the number of updates to be retrieved; minimum value is 1, default is 100.
  • Timeout — Timeout in seconds for the long polling request; minimum value is 0, default is 60.
  • Filter by Username (Optional) — Filters incoming updates to only include those from a specified username (without '@'); leave empty to receive updates from all users. Only updates that include a user ID will be emitted when this filter is active.
  • Allowed Updates (required) — Selects the types of Telegram updates the bot will receive. Options include message, edited message, callback query, poll, chat member updates, and others. Selecting 'All Updates' disables filtering by update type except a few specific types that are excluded by default.

Output shape

a list of update events matching the specified filters, each as a JSON object corresponding to a Telegram update

Events are emitted continuously as they are received via long polling. The node uses the Telegram Bot API's getUpdates method, supports offset management to avoid duplicate events, and applies filtering by update type and username before emitting. If no events match filters, no output is emitted during that polling cycle.

Examples

Example 1: Receiving new messages only

Set Allowed Updates to 'Message' and leave Filter by Username empty to receive all new messages sent to the bot.

Example 2: Filtering updates from a specific user

Set Filter by Username to the target user's username (without '@') to emit only updates originating from that user.

Links

Discussion