N8N Tools Telegram icon

N8N Tools Telegram

Interact with Telegram Bot API

Overview

This node integrates with the Telegram Bot API via the N8N Tools Telegram service, enabling automation of various Telegram bot-related tasks. Specifically for the Bots resource and the Delete My Commands operation, it allows users to delete all commands previously set for their Telegram bot.

Common scenarios where this is useful include:

  • Resetting or clearing the command list of a Telegram bot when commands are no longer relevant.
  • Automating bot maintenance workflows that require removing outdated or deprecated commands.
  • Managing bot behavior dynamically by programmatically deleting commands before setting new ones.

Practical example:

  • A workflow that updates a Telegram bot’s commands daily might first delete all existing commands using this operation, then set a fresh list of commands based on current needs.

Properties

Name Meaning
Options Additional options as a JSON object. For the Delete My Commands operation, these can specify scope and language code to target specific command sets.

Note: The Options property accepts a JSON object that may include fields like scope (to define the user scope for commands) and language_code (to specify the language of the commands to delete).

Output

The output is a JSON object representing the response from the Telegram Bot API after attempting to delete the bot's commands. This typically includes a boolean field indicating success or failure of the deletion request.

Example output structure:

{
  "ok": true,
  "result": true
}

No binary data is produced by this operation.

Dependencies

  • Requires an active subscription and valid API key credential for the N8N Tools API service.
  • Requires Telegram Bot API credentials (an API token for the Telegram bot).
  • The node performs an initial validation call to the N8N Tools API to verify subscription and API key validity before executing the Telegram API call.
  • Network access to both the N8N Tools API endpoint and Telegram Bot API endpoints is necessary.

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 N8N Tools API is correct and active.
  • Unknown operation error: This node supports only predefined operations; ensure the operation parameter is correctly set to "deleteMyCommands" for this use case.
  • Malformed JSON in Options: Since the Options property expects a JSON object, invalid JSON syntax will cause errors. Validate JSON formatting before execution.
  • Permission issues: Ensure the Telegram bot token has sufficient permissions to manage commands.
  • Network errors: Connectivity problems to either the N8N Tools API or Telegram API will cause failures; check network settings and firewall rules.

Links and References

Discussion