Actions13
Overview
This node implements a Telegram client using the MTProto protocol, enabling interaction with Telegram chats and messages programmatically. The "Forward Message" operation specifically allows forwarding an existing message from one chat to another.
Typical use cases include:
- Automatically forwarding important messages from monitored channels or groups to other chats.
- Creating workflows that redistribute content across multiple Telegram chats without manual intervention.
- Archiving or backing up messages by forwarding them to a dedicated chat.
For example, you could forward alerts from a monitoring channel to a team group chat automatically.
Properties
Name | Meaning |
---|---|
Chat ID | The source chat/channel ID or username where the original message is located (e.g., @username or -100xxxx). |
Message ID | The unique identifier of the message to forward. |
To Chat ID | The destination chat ID where the message will be forwarded. |
Options | Additional options (not used in Forward Message operation but available for others). |
Output
The output JSON object contains:
success
(boolean): Indicates if the forwarding was successful.originalMessageId
(number): The ID of the original message that was forwarded.forwardedMessages
(array): An array of message objects representing the forwarded messages returned by Telegram.fromChatId
(string): The source chat ID from which the message was forwarded.toChatId
(string): The destination chat ID to which the message was forwarded.
No binary data is output by this operation.
Dependencies
- Requires valid Telegram API credentials including an API ID, API hash, and a session string for authentication.
- Uses the Telegram MTProto client library bundled within the node's SDK.
- Requires network connectivity to Telegram servers via WebSocket Secure (WSS).
Troubleshooting
- Missing Credentials: If no credentials are provided, the node throws an error. Ensure you have configured the required Telegram API credentials properly.
- Invalid Chat or Message IDs: Forwarding will fail if the chat IDs or message ID do not exist or are inaccessible by the authenticated account.
- Permission Issues: The account must have permission to read messages in the source chat and send messages in the destination chat.
- Connection Errors: Network issues or Telegram server downtime can cause connection failures.
- Unsupported Operation Error: If the operation parameter is incorrect or unsupported, an error is thrown.
- Continue on Fail: If enabled, errors during processing individual items will be captured in the output instead of stopping execution.
Links and References
- Telegram MTProto API Documentation
- Telegram Bot API Overview (for general Telegram API concepts)
- n8n Documentation for configuring credentials and nodes