Actions12
Overview
The node implements a Telegram client that interacts with the Telegram API to perform various messaging operations. Specifically, for the Reply To Message operation, it allows sending a text message as a reply to an existing message in a specified chat or channel.
This is useful when you want to programmatically respond to a particular message in a conversation thread, maintaining context and clarity in group chats or channels. For example, a bot can automatically reply to user queries or notifications by referencing the original message.
Practical scenarios include:
- Customer support bots replying to user messages.
- Automated notifications that respond to specific commands or alerts.
- Moderation tools that reply to flagged messages with warnings or instructions.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The identifier of the chat or channel where the reply will be sent. Can be an ID or username (e.g., @username or -100xxxx). |
| Message Text | The text content of the reply message to send. |
| Message ID | The ID of the message to which this new message will be a reply. |
| Options | Additional optional settings: |
| - Silent: Send the message without notification (boolean). | |
| - Caption: Caption for media messages (string, not used in reply but available in options). | |
| - Parse Mode: How to parse the message text; options are None, Markdown, or HTML. |
Output
The output JSON object for the Reply To Message operation includes:
success: Boolean indicating if the message was sent successfully.messageId: The unique ID of the newly sent reply message.replyToMessageId: The ID of the original message being replied to.date: Timestamp of when the reply message was sent.text: The text content of the reply message.
Example output JSON structure:
{
"success": true,
"messageId": 12345,
"replyToMessageId": 67890,
"date": "2024-06-01T12:34:56Z",
"text": "Your reply message text here"
}
Dependencies
- Requires valid Telegram API credentials including an API ID, API hash, and a session string.
- Uses the Telegram Client SDK internally to connect and interact with the Telegram API.
- The node must be configured with these credentials before use.
Troubleshooting
- No credentials provided: The node will throw an error if the required Telegram API credentials are missing. Ensure credentials are properly set up in n8n.
- Invalid Chat ID or Message ID: Errors may occur if the chat/channel ID or message ID does not exist or the bot/user does not have access. Verify IDs and permissions.
- Parse Mode errors: If the message text contains unsupported formatting for the selected parse mode (Markdown or HTML), the Telegram API may reject the message.
- Connection issues: Network problems or invalid session tokens can cause connection failures. Re-authenticate or check network connectivity.
- Silent option: If enabled, the message will be sent without notifying users, which might cause confusion if expecting visible alerts.
If the node is set to continue on failure, errors will be returned in the output JSON under the error field with details.