Actions23
- Chat Actions
- Callback Actions
- File Actions
- Message Actions
Overview
This node integrates with the Telegram API to perform a wide range of messaging and chat management operations. It allows users to send messages, media files (photos, videos, audio, documents, animations, stickers), manage chat properties (like titles and descriptions), handle callback queries, and interact with chat members and administrators.
Common scenarios include:
- Automating sending text or multimedia messages to Telegram chats or channels.
- Managing group chats by setting titles, descriptions, or leaving groups.
- Responding to inline or callback queries from Telegram bots.
- Editing or deleting existing messages.
- Sending custom keyboards or inline keyboards for interactive user responses.
Practical examples:
- A bot that sends daily updates with images and buttons for user interaction.
- Automatically responding to user queries via inline keyboards.
- Moderation tools that pin/unpin messages or retrieve chat member info.
Properties
Name | Meaning |
---|---|
Reply Keyboard | Adds a custom reply keyboard with multiple rows and buttons. Buttons can request contact or location information from users. |
Reply Keyboard Options | Options for the reply keyboard such as resizing the keyboard, making it one-time use, or showing it selectively to specific users. |
Reply Keyboard Remove | Options to remove the custom keyboard, optionally targeting specific users only. |
Chat ID | Unique identifier or username of the target chat/channel where actions are performed. |
Message ID | Identifier of a message to delete, edit, pin, or unpin. |
User ID | Identifier of a user in a chat (used for getting chat member info). |
Description | New description text for a chat (0-255 characters). |
Title | New title for a chat (1-255 characters). |
Query ID | Identifier for callback or inline query to answer. |
Results | JSON array of results to answer an inline query. |
File ID | Identifier of a file to retrieve from Telegram servers. |
Download | Whether to download the retrieved file. |
Message Type | Specifies if editing targets an inline message or a regular message. |
Binary File | Indicates if the file to upload is provided as binary data. |
Input Binary Field | Name of the binary property containing the file data to upload. |
Text | Text content of messages to send or edit. |
File (Animation, Audio, Document, Photo, Sticker, Video) | File identifier, URL, or binary data to send as respective media types. |
Action | Chat action to broadcast (e.g., typing, uploading photo). |
Latitude, Longitude | Coordinates for sending location messages. |
Media | Collection of media items (photos/videos) to send as a media group. |
Reply Markup | Additional interface options for messages: none, force reply, inline keyboard, reply keyboard, or remove keyboard. |
Force Reply | Options to force a reply interface on the client side, optionally selective to certain users. |
Inline Keyboard | Defines inline keyboard layout with rows and buttons, supporting callback data, URLs, pay buttons, and inline query switches. |
Additional Fields | Various optional parameters depending on operation, e.g., disable notifications, captions, parse modes, duration, performer, thumbnail, etc. |
Output
The node outputs an array of items, each containing:
json
: The JSON response from the Telegram API corresponding to the requested operation.binary
(optional): For file retrieval operations with download enabled, the binary data of the downloaded file is included under thedata
property.
The output structure varies depending on the operation but generally reflects the Telegram API's response format for the invoked method.
Dependencies
- Requires a valid Telegram API authentication token configured in n8n credentials.
- Uses Telegram Bot API endpoints to perform all operations.
- For file downloads, it uses a proxy URL (
https://rahsaz-tlg.ramous.workers.dev/file/bot...
) to fetch files from Telegram servers.
Troubleshooting
- Missing File Name for Uploads: When uploading binary files, a file name must be provided either in the binary property metadata or manually via the "File Name" additional field. Failure to do so will cause an error.
- Invalid Chat or Message IDs: Ensure that chat IDs, message IDs, and user IDs are correct and accessible by the bot; otherwise, API calls will fail.
- Unsupported Resource or Operation: Selecting an unknown resource or operation will throw an error indicating the resource is not known.
- Binary Data Handling: If "Binary File" is enabled but the specified binary property does not exist or is empty, the node will error out.
- API Rate Limits: Frequent requests may hit Telegram API rate limits; consider adding delays or error handling for retries.
- Download Failures: File download depends on the proxy service availability; network issues or invalid file paths may cause failures.