Telegram Multi icon

Telegram Multi

Send messages and interact with multiple Telegram bots

Actions7

Message → Delete

AI-generated

Overview

This node deletes a specific message in a Telegram chat using the Telegram Bot API. It is useful for automating the removal of messages from channels, groups, or private chats, for example, to moderate content or retract sent messages programmatically.

Use Case Examples

  1. Automatically delete a message in a Telegram group after a certain condition is met.
  2. Remove outdated announcements from a Telegram channel by deleting specific messages.

Properties

Name Meaning
Authentication Method Method to provide the Telegram bot token for authentication. Options include encrypted credentials stored in n8n, environment variable, or direct input (not recommended for production).
Environment Token The environment variable containing the bot token, used if the authentication method is set to environment variable.
Bot Token The Telegram bot token provided directly, used if the authentication method is set to direct input.
Chat ID The identifier of the chat where the message to be deleted is located. Can be a channel username (e.g., @channel_name) or a group ID (e.g., -123456789).
Message ID The unique identifier of the message to delete within the specified chat.

Output

JSON

  • json - The response from the Telegram API after attempting to delete the message, typically indicating success or failure.

Dependencies

  • Telegram Bot API token (via credentials, environment variable, or direct input)

Troubleshooting

  • Ensure the bot token is valid and has the necessary permissions to delete messages in the specified chat.
  • Verify that the chat ID and message ID are correct and that the bot is a member of the chat with appropriate rights.
  • Common error: 'Invalid bot token format' indicates the token does not match Telegram's expected format; check the token input method and value.
  • If deletion fails with permission errors, confirm the bot has admin rights to delete messages in the chat.

Links

Discussion