N8N Tools Telegram icon

N8N Tools Telegram

Interact with Telegram Bot API

Overview

The node provides integration with the Telegram Bot API, enabling various operations on Telegram resources such as messages, chats, updates, bots, files, inline queries, and callback queries. Specifically for the Messages resource and the Copy Message operation, the node allows users to copy a message from one chat to another within Telegram.

This is useful in scenarios where you want to duplicate or forward content without forwarding metadata (like the original sender info), effectively creating a new message with the same content. For example, a bot could copy an important announcement message from one group chat to multiple other groups automatically.

Properties

Name Meaning
Chat ID The unique identifier for the target Telegram chat where the message will be copied to.
Message ID The unique identifier of the Telegram message to be copied from the source chat.

Output

The output of the node is a JSON object representing the result returned by the Telegram Bot API after copying the message. This typically includes details about the newly created message in the target chat, such as its message ID, date, chat information, and content.

If the operation fails, the output may contain an error message describing the issue.

The node does not output binary data for this operation.

Dependencies

  • Requires a valid Telegram Bot API token configured as credentials in n8n.
  • Requires access to the "N8N Tools API" service with a valid subscription and API key for validation before executing Telegram API calls.
  • The node uses HTTP requests to interact with both the N8N Tools API and the Telegram Bot API endpoints.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that the API key credential for the external validation service is correct and active.
  • Unknown operation error: Ensure that the operation parameter is set correctly to "copyMessage" when working with the Messages resource.
  • Missing required parameters: Both "Chat ID" and "Message ID" are required. Omitting these will cause errors.
  • Telegram API errors: Errors returned from Telegram (e.g., message not found, chat not accessible) will be passed through. Check that the bot has appropriate permissions in the source and target chats.

Links and References

Discussion