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 different Telegram resources such as messages, updates, chats, bots, files, inline queries, and callback queries. Specifically, for the Updates resource and the Delete Webhook operation, this node allows users to delete an existing webhook configuration from their Telegram bot.

This is useful in scenarios where you want to stop receiving updates via a webhook and possibly switch back to polling or change the webhook URL. For example, if your Telegram bot was previously set up to receive updates through a webhook but you want to disable it temporarily or permanently, this operation will remove the webhook configuration.

Properties

Name Meaning
Options Additional options as a JSON object. (For Updates resource, including Delete Webhook)
  • The Options property is a JSON input that can be used to provide extra parameters if needed by other operations under the Updates resource. For the Delete Webhook operation, no specific options are required or used.

Output

The output of the Delete Webhook operation is a JSON object representing the response from the Telegram Bot API after attempting to delete the webhook. Typically, this will include a success status or error information.

The node outputs an array of items, each containing a json field with the API response data. There is no binary data output for this operation.

Example output structure:

{
  "json": {
    "ok": true,
    "result": true
  }
}
  • ok: Boolean indicating if the request was successful.
  • result: Boolean indicating whether the webhook was deleted successfully.

Dependencies

  • Requires an active Telegram Bot API token credential to authenticate requests.
  • Requires an API key credential for the external validation service ("N8N Tools API") which validates subscription and API key before making Telegram API calls.
  • The node uses an internal helper class to interact with the Telegram Bot API endpoints.
  • No additional environment variables are explicitly required beyond these credentials.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that the API key credential for the external validation service is correct and active.
  • Telegram API errors: Errors returned from Telegram (e.g., due to invalid bot token or network issues) will be propagated. Check the bot token and network connectivity.
  • Unknown operation error: This should not occur if the node parameters are correctly set to "Delete Webhook" under the "Updates" resource.
  • Continue on Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error details in the output JSON.

Links and References

Discussion