N8N Tools Telegram icon

N8N Tools Telegram

Interact with Telegram Bot API

Overview

This node enables interaction with the Telegram Bot API, specifically allowing various operations on Telegram messages, chats, updates, bots, files, inline queries, and callback queries. For the Messages resource with the Delete Message operation, it deletes a specific message in a Telegram chat by its message ID.

Common scenarios for this node include automating Telegram bot workflows such as managing messages (sending, editing, deleting), handling chat administration, processing updates, or responding to inline and callback queries. For example, you can use it to automatically delete messages that meet certain criteria, like removing outdated notifications or moderating content in group chats.

Properties

Name Meaning
Chat ID The unique identifier of the Telegram chat where the message exists.
Message ID The unique identifier of the Telegram message to be deleted.

Output

The output is a JSON object representing the result of the delete message operation as returned by the Telegram Bot API. Typically, this will be a boolean indicating whether the deletion was successful (true if deleted, false otherwise).

No binary data output is produced by this operation.

Dependencies

  • Requires an active Telegram Bot API token configured as credentials.
  • Requires a valid subscription and API key for the "N8N Tools API" service used for validation before making Telegram API calls.
  • 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 error: If the node throws an error about invalid subscription or API key, verify that your API key credential is correct and has an active subscription.
  • Permission errors: Deleting messages requires the bot to have appropriate permissions in the target chat. Ensure the bot is an admin or has rights to delete messages.
  • Message not found: If the specified message ID does not exist or was already deleted, the Telegram API may return an error. Double-check the message ID and chat ID.
  • Chat ID format: The chat ID must be accurate; using incorrect or malformed IDs will cause failures.
  • Continue on Fail: If enabled, the node will continue processing other items even if one fails, returning error details in the output JSON.

Links and References

Discussion