Telegram Client icon

Telegram Client

Use Telegram Client API

Overview

The node provides integration with the Telegram Client API, enabling various messaging and chat management operations within Telegram. Specifically for the Delete Messages operation, it allows users to delete one or more messages from a specified chat or channel by message ID. This is useful in scenarios where you want to programmatically remove messages, such as cleaning up old or sensitive content, moderating chats, or automating message lifecycle management.

Practical example:

  • Automatically deleting a specific message after processing it.
  • Removing spam or unwanted messages from a group or channel.

Properties

Name Meaning
Chat ID The identifier of the chat or channel where the message exists. Can be a numeric ID or username (e.g., @username or -100xxxx).
Message ID The unique identifier of the message to delete within the specified chat.

Output

The output JSON object contains:

  • success: Boolean indicating if the deletion was successful.
  • deletedMessageId: The ID of the message that was deleted.

Example output:

{
  "success": true,
  "deletedMessageId": 12345
}

This confirms the targeted message was successfully removed.

Dependencies

  • Requires an active Telegram Client API credential including session data, API ID, and API hash.
  • The node uses the Telegram Client SDK to connect and perform actions.
  • Network connectivity to Telegram servers is necessary.
  • No additional environment variables are required beyond the provided credentials.

Troubleshooting

  • No credentials provided: The node will throw an error if the Telegram API credentials are missing or invalid. Ensure valid credentials are configured.
  • Invalid Chat ID or Message ID: If the chat or message does not exist or the bot/user lacks permission, the deletion will fail. Verify IDs and permissions.
  • Connection issues: Network problems or Telegram server downtime can cause connection failures. Retry later or check network settings.
  • Operation not supported: If an unsupported operation is selected, an error will be thrown.
  • Continue on Fail: If enabled, errors during execution will be captured in the output instead of stopping the workflow.

Links and References

Discussion