Telegram Advance AI Webhook icon

Telegram Advance AI Webhook

AI Agent-ready Telegram webhook node for sending messages and media, downloading files, or waiting for in-chat responses

Send and Wait for Response

AI-generated

Summary

Sends a text message or media question with inline buttons or a reply prompt to a Telegram chat and waits for an in-chat response before continuing execution.

Inputs

  • chatId (required) — Target Telegram chat ID.
  • question (required) — Text message or caption presented to the Telegram user.
  • questionContent — Determines whether the question is sent as plain text or as a media caption ('text' or 'media').
  • responseType — The interactive response control type: 'approval' (Approve/Decline buttons), 'choice' (custom buttons), 'radio' (single choice selection), 'checkbox' (multi-choice selection), 'linkedList' (interactive URL list items), or 'text' (free-text reply prompt).
  • choiceSource — Source for choice options ('fixed' to define manually or 'expression' for dynamic array input).
  • choices — Fixed choice items containing labels and return values for choice, radio, or checkbox inputs.
  • dynamicChoices — JSON array of objects containing label and value fields when choice source is set to expression.
  • waitAmount — Numeric duration to wait for a user response before timing out (default is 5).
  • waitUnit — Time unit for the wait limit limit ('minutes', 'hours', or 'days').
  • onTimeout — Behavior when no response is received within the wait limit: 'return' (emits a timeout item) or 'error' (fails the node).
  • options — Additional settings including response acknowledgement text, allowed Telegram user IDs, parse mode, disable notification, and button auto-removal.

Output shape

a single record object containing either the captured user response payload or timeout metadata

When answered, the output item contains a 'response' object with fields such as 'value', 'label', 'user', 'chat', and timestamp. If the wait limit expires and 'onTimeout' is set to 'return', the output item contains 'timedOut: true', 'questionMessageId', and 'chat'.

Examples

Example 1: Request approval for a high-value transaction

Set Chat ID to '={{ $json.chatId }}', Question to 'Approve payout of $500?', Response Type to 'Approval', Approve Label to '✅ Approve', Decline Label to '❌ Reject', and Wait Limit Amount to 15 minutes.

Example 2: Ask a user to pick one product from a dynamic list

Set Chat ID to '={{ $json.chatId }}', Question to 'Select a product:', Response Type to 'Radio Buttons', Choice Source to 'Expression', Dynamic Choices to '={{ $json.products }}', and On Timeout to 'Return Timeout Item'.

Links

Discussion