N8N Tools Telegram icon

N8N Tools Telegram

Interact with Telegram Bot API

Overview

The node provides integration with the Telegram Bot API, enabling automation of various Telegram chat-related actions. Specifically for the Chats resource and the Unpin Chat Message operation, it allows users to unpin a previously pinned message in a Telegram chat by specifying the chat ID and the message ID.

This is useful in scenarios where you want to programmatically manage chat messages, such as removing outdated or irrelevant pinned messages from group chats or channels without manual intervention.

Practical example:

  • Automatically unpin a welcome message after a certain event or time period.
  • Manage pinned messages dynamically based on workflow logic, e.g., unpinning announcements once they expire.

Properties

Name Meaning
Chat ID The unique identifier for the target Telegram chat where the message is pinned.
Message ID The identifier of the specific message within the chat that should be unpinned.
Options Additional optional parameters as a JSON object to customize the unpin operation (if any).

Output

The node outputs a JSON object representing the response from the Telegram Bot API for the unpin operation. This typically includes a boolean true if the unpin was successful or an error message if it failed.

No binary data output is involved in this operation.

Dependencies

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

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that your API key credential for the external validation service is correct and active.
  • Telegram API errors: Common errors include invalid chat ID or message ID, or insufficient bot permissions to modify chat messages. Ensure the bot has admin rights in the chat to unpin messages.
  • Missing required parameters: The node requires both Chat ID and Message ID; missing these will cause errors.
  • JSON parsing errors: The "Options" property expects valid JSON if used; malformed JSON will cause failures.

Links and References

Discussion