N8N Tools Telegram icon

N8N Tools Telegram

Interact with Telegram Bot API

Overview

The node "N8N Tools Telegram" enables interaction with the Telegram Bot API, allowing users to perform various operations on Telegram resources such as messages, chats, updates, bots, files, inline queries, and callback queries. Specifically, for the Messages resource and the Forward Message operation, this node forwards a message from one chat to another.

This is useful in scenarios where you want to automate message forwarding between different Telegram chats or channels, for example:

  • Automatically forwarding alerts or notifications from a monitoring bot to a team chat.
  • Relaying user messages from a public channel to a private group.
  • Archiving important messages by forwarding them to a dedicated chat.

Properties

Name Meaning
Chat ID The Telegram Chat ID where the message will be forwarded to.
Message ID The Telegram Message ID of the message to forward.
fromChatId (Implicitly used) The source chat ID from which the message will be forwarded.
Options Additional optional parameters for forwarding the message (e.g., disable notification).

Note: The provided properties JSON only explicitly lists chatId and messageId. However, the code shows that fromChatId and options are also used internally for forwarding.

Output

The output is a JSON object representing the response from the Telegram Bot API after forwarding the message. This typically includes details about the forwarded message such as message identifiers, date, sender information, and chat details.

If an error occurs during execution, the output JSON will contain an error field with the error message, provided the node is configured to continue on failure.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active Telegram Bot API token credential to authenticate requests.
  • Requires a valid subscription and API key for the external "N8N Tools API" service, which validates usage before forwarding requests to Telegram.
  • The node uses HTTP requests to communicate with both the N8N Tools API and the Telegram Bot API endpoints.

Troubleshooting

  • Invalid subscription or API key: If the node throws an error indicating invalid subscription or API key, verify that the API key credential is correctly configured and active.
  • Unknown operation error: Ensure the operation parameter is set exactly to "forwardMessage" when forwarding messages.
  • Missing required parameters: Both chatId (destination chat) and messageId (message to forward) must be provided; missing these will cause errors.
  • Permission issues: The bot must have permission to read messages in the source chat and send messages in the destination chat.
  • Network or API errors: Check network connectivity and Telegram Bot API status if requests fail unexpectedly.

Links and References

Discussion