N8N Tools Telegram icon

N8N Tools Telegram

Interact with Telegram Bot API

Overview

The node "N8N Tools Telegram" integrates with the Telegram Bot API, enabling automation workflows to interact with Telegram chats, messages, bots, files, inline queries, callback queries, and updates. Specifically, for the Chats resource and the Approve Chat Join Request operation, this node allows a bot to approve a user's request to join a chat. This is useful in scenarios where a Telegram group or channel requires admin approval for new members, and you want to automate the approval process based on external triggers or conditions.

Practical example:
You can use this node to automatically approve users who meet certain criteria (e.g., verified users from your database) when they request to join a Telegram group, streamlining community management without manual intervention.

Properties

Name Meaning
Chat ID The unique identifier of the Telegram chat where the join request was made.
User ID The unique identifier of the Telegram user whose join request is to be approved.
Options Additional optional parameters as JSON to customize the operation (not specifically used in this operation).

Output

The output is a JSON object representing the response from the Telegram Bot API after approving the chat join request. It typically contains confirmation details about the approval action.

  • The json field includes the API response data.
  • 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 "N8N Tools API" service, which validates usage before forwarding requests to Telegram.
  • The node makes HTTP POST requests to the N8N Tools API endpoint for validation and then calls the Telegram API via the bundled TelegramApi helper class.

Troubleshooting

  • Invalid subscription or API key error: If you receive errors indicating invalid subscription or API key, verify that your API key credential is correct and active.
  • Unknown operation error: Ensure the operation name matches exactly "approveChatJoinRequest" when configuring the node.
  • Missing required parameters: Both chatId and userId are mandatory; missing either will cause the node to fail.
  • API rate limits or Telegram errors: These may occur if the bot exceeds Telegram's limits or lacks sufficient permissions in the chat. Check bot admin rights and Telegram API limits.

Links and References

Discussion