N8N Tools Telegram icon

N8N Tools Telegram

Interact with Telegram Bot API

Overview

This node integrates with the Telegram Bot API to perform various chat-related operations, including managing chat photos. Specifically, the "Delete Chat Photo" operation removes the current photo of a specified Telegram chat. This is useful for bot administrators who want to programmatically update or clear chat photos without manual intervention.

Common scenarios include:

  • Automatically clearing group or channel photos based on certain triggers.
  • Managing chat appearance dynamically in response to events.
  • Cleaning up chat visuals as part of moderation workflows.

Example: A bot that deletes the chat photo when a specific command is received or after a scheduled time.

Properties

Name Meaning
Chat ID The unique identifier for the Telegram chat where the photo will be deleted.
Options Additional JSON options for the operation (not specifically used in Delete Chat Photo).

Output

The node outputs a JSON object representing the result returned by the Telegram Bot API for the delete chat photo request. Typically, this is a boolean indicating success (true) or failure (false).

No binary data output is involved in this operation.

Dependencies

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

Troubleshooting

  • Invalid subscription or API key error: If you see "N8N Tools API: Invalid subscription or API key," verify your API key and subscription status for the external validation service.
  • Unknown operation error: Ensure the operation name is correctly set to "Delete Chat Photo" under the Chats resource.
  • Chat ID errors: Make sure the Chat ID is correct and the bot has appropriate permissions in the chat.
  • API rate limits or permission errors: Telegram may reject requests if the bot lacks admin rights or exceeds rate limits; check bot permissions and retry policies.

Links and References

Discussion