N8N Tools Telegram icon

N8N Tools Telegram

Interact with Telegram Bot API

Overview

The node "N8N Tools Telegram" enables interaction with the Telegram Bot API, allowing users to perform a wide range of operations on Telegram resources such as messages, chats, bots, files, inline queries, and callback queries. Specifically for the Chats resource and the Promote Chat Member operation, this node promotes a specified user within a chat to have administrator privileges with customizable rights.

This node is beneficial in scenarios where automated management of Telegram group or channel administrators is needed, such as:

  • Automatically promoting trusted users based on external triggers.
  • Managing chat roles dynamically in response to workflow events.
  • Integrating Telegram chat administration into broader automation pipelines.

Example use case: When a new member joins a Telegram group and meets certain criteria, this node can promote them to an admin role with specific permissions without manual intervention.

Properties

Name Meaning
Chat ID The unique identifier for the Telegram chat where the promotion will take place.
User ID The unique identifier of the Telegram user to be promoted to chat administrator status.
Options Additional options for promotion, provided as a JSON object. These define the admin rights and other parameters for the promoted user.

Output

The node outputs a JSON object representing the response from the Telegram Bot API for the promoteChatMember call. This typically includes confirmation of the promotion and details about the updated administrator status of the user.

If the operation fails, the output JSON contains an error field with the error message explaining the failure.

No binary data output is involved in this operation.

Dependencies

  • Requires a valid Telegram Bot API token configured as credentials in n8n.
  • Requires access to the "N8N Tools API" service with a valid subscription and API key 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 endpoints.

Troubleshooting

  • Invalid subscription or API key error: If you receive an error indicating invalid subscription or API key, verify that your N8N Tools API credentials are correct and active.
  • Unknown operation error: Ensure that the operation name is correctly set to "promoteChatMember" when using the Chats resource.
  • Missing required parameters: The Chat ID and User ID must be provided; missing these will cause errors.
  • Permission errors from Telegram: The bot must have sufficient rights in the chat to promote members. Check the bot's permissions in the Telegram group or channel.
  • Malformed JSON in Options: The "Options" property must be valid JSON defining the admin rights; invalid JSON will cause parsing errors.

Links and References

Discussion