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. Specifically, for the "Create Chat Invite Link" operation under the "Chats" resource, it allows users to generate a new invite link for a specified Telegram chat. This is useful for automating the management of group or channel invitations, such as creating temporary or customized invite links programmatically.

Practical examples include:

  • Automatically generating invite links when onboarding new members.
  • Creating invite links with specific expiration times or usage limits.
  • Integrating invite link creation into workflows that manage chat memberships or promotions.

Properties

Name Meaning
Chat ID The unique identifier for the Telegram chat where the invite link will be created.
Options Additional options for creating the invite link, provided as a JSON object. These can include parameters like expiration date, member limit, name, etc., as supported by the Telegram API.

Output

The node outputs a JSON object representing the response from the Telegram API for the created chat invite link. This typically includes details such as the invite link URL and metadata about the link (e.g., expiration, member limit).

The output structure corresponds directly to the Telegram Bot API's createChatInviteLink method response, which contains fields like:

  • invite_link: The actual invite URL.
  • Other optional properties describing the invite link's restrictions or settings.

No binary data output is involved in this operation.

Dependencies

  • Requires an active Telegram Bot API token credential to authenticate requests.
  • Requires a valid subscription or API key for the external "N8N Tools API" service used for validation before making Telegram API calls.
  • The node uses HTTP requests to the Telegram Bot API endpoints via the helper class internally.

Troubleshooting

  • Invalid Subscription or API Key: If the node throws an error indicating 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., invalid chat ID, insufficient bot permissions) will be surfaced. Ensure the bot has appropriate rights in the target chat.
  • Malformed Options JSON: The "Options" property must be valid JSON. Invalid JSON syntax will cause parsing errors.
  • Unknown Operation Error: If the operation parameter is incorrect or unsupported, the node will throw an "Unknown operation" error.

Links and References

Discussion