Actions24
- Chat Actions
- Callback Actions
- File Actions
- Message Actions
Overview
This node sends a message to a specified Telegram chat and optionally waits for a user response. It supports sending various types of messages including text, animations, audio, documents, locations, media groups, photos, stickers, and videos. The node can also handle reply markups such as inline keyboards, reply keyboards, and force replies. When the 'Send and Wait for Response' operation is selected, the node sends a message and pauses execution until a response is received or a timeout occurs. This is useful for interactive Telegram bots that require user input after sending a message.
Use Case Examples
- Sending a text message to a Telegram chat and waiting for the user's reply to continue the workflow.
- Sending a photo with an inline keyboard to a Telegram chat and waiting for the user to press a button.
- Sending a location message and waiting for the user to respond with confirmation or additional input.
Properties
| Name | Meaning |
|---|---|
| Chat ID | Unique identifier for the target chat or username of the target channel (in the format @channelusername). This is required to specify where the message will be sent. |
| Wait for Response | Boolean flag to indicate whether the node should wait for a response from the user after sending the message. |
| Timeout | The time in seconds to wait for a user response when 'Wait for Response' is enabled. Defaults to 300 seconds. |
| Force Reply | Options to force the reply interface to show to the user, mimicking manual reply selection. Can be selective to specific users. |
| Inline Keyboard | Adds an inline keyboard next to the message with customizable rows and buttons, including callback data, URLs, and web app links. |
| Reply Keyboard | Adds a custom reply keyboard with rows of buttons that can request contact, location, or launch web apps. |
| Reply Keyboard Options | Options to resize the keyboard, make it one-time use, or show it selectively to specific users. |
| Reply Keyboard Remove | Options to remove the custom keyboard and selectively force reply from specific users. |
Output
JSON
json- The JSON response from the Telegram API after sending the message or performing the requested operation.
Dependencies
- Telegram API
- An API key credential for Telegram authentication
Troubleshooting
- Ensure the Chat ID is correct and the bot has permission to send messages to the chat.
- If waiting for a response, verify the timeout is sufficient and the user responds within that time.
- When sending files from binary data, ensure the binary property contains a valid file name and MIME type.
- Common errors include invalid chat ID, missing required parameters, or insufficient bot permissions. Check the error message for details and verify the node configuration.
Links
- Telegram Bot API - sendMessage - Official Telegram API documentation for sending messages.
- Telegram Bot API - Inline Keyboard - Documentation on how to use inline keyboards in Telegram messages.