Actions12
Overview
This node integrates with the Telegram Client API to perform various messaging and chat management operations. Specifically, the Forward Message operation allows users to forward a message from one chat or channel to another within Telegram.
Common scenarios for this node include:
- Automatically forwarding important messages from monitored channels to specific groups or users.
- Creating workflows that redistribute content across multiple chats without manual intervention.
- Archiving or backing up messages by forwarding them to a dedicated chat.
For example, you could set up an automation where any message received in a support channel is forwarded to a private admin group for review.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The source chat or channel ID or username (e.g., @username or -100xxxx) from which to forward the message. |
| Message ID | The unique identifier of the message to be forwarded. |
| To Chat ID | The destination chat ID or username where the message will be forwarded. |
| Options | Additional options: • Silent: Send message silently without notification (boolean). • Caption: Caption for media messages (string). • Parse Mode: How to parse the message text; options are None, Markdown, HTML. • Limit: Maximum number of items to return (number). |
Note: For the Forward Message operation, only Chat ID, Message ID, and To Chat ID are required and used. The Options collection is available generally but not specifically applied in forwarding.
Output
The output JSON object for the Forward Message operation includes:
success: Boolean indicating if the forwarding was successful.originalMessageId: The ID of the original message that was forwarded.forwardedMessages: An array containing details of the forwarded message(s), including their new IDs and metadata.fromChatId: The source chat ID from which the message was forwarded.toChatId: The destination chat ID to which the message was forwarded.
This structured output allows downstream nodes or workflows to track the forwarding result and reference the new message IDs.
No binary data output is produced by this operation.
Dependencies
- Requires an active Telegram API client session authenticated via API credentials (API ID and API Hash).
- Needs a valid API key credential configured in n8n to connect to the Telegram Client API.
- Uses WebSocket Secure (WSS) connection with retry logic for robustness.
Troubleshooting
- Missing Credentials Error: If no credentials are provided, the node throws an error. Ensure that the Telegram API credentials are correctly configured in n8n.
- Session Issues: Debug logs indicate if the session string is missing or empty. Re-authenticate or refresh credentials if connection fails.
- Unsupported Operation: Attempting to use an unsupported operation name results in an error. Verify the operation parameter is set to "forwardMessage".
- Message Not Found: Forwarding a non-existent message ID may cause errors. Confirm the message ID exists in the source chat.
- Permission Errors: Forwarding messages between certain chats or channels may require appropriate permissions or membership.
- Connection Failures: Network issues or invalid API credentials can prevent connecting to Telegram. Check network connectivity and credential validity.
If the node is set to continue on failure, errors are returned in the output JSON with the error message and operation name for easier debugging.