Rahsaz Telegram icon

Rahsaz Telegram

Sends data to Telegram

Overview

The "Unpin Chat Message" operation in this Telegram node allows users to remove a pinned message from a specific chat. This is useful when you want to unhighlight or remove the importance of a previously pinned message in a group, channel, or private chat.

Common scenarios include:

  • Unpinning outdated announcements or messages in a group chat.
  • Managing pinned content dynamically based on context or time.
  • Automating chat moderation workflows where pinned messages need to be updated or cleared.

For example, if a bot pins a welcome message at the start of a day, it can later unpin that message automatically when it's no longer relevant.

Properties

Name Meaning
Chat ID Unique identifier for the target chat or username of the target channel (format: @channelusername). Specifies which chat to unpin the message from.
Message ID Unique identifier of the message to unpin. Identifies the exact message within the chat to be unpinned.

Output

The output JSON contains the response from the Telegram API after attempting to unpin the message. Typically, this will confirm whether the unpin action was successful.

The structure is an array of items, each with a json property holding the API response object. No binary data is produced by this operation.

Example output snippet:

[
  {
    "json": {
      "ok": true,
      "result": true
    }
  }
]

Here, "result": true indicates the message was successfully unpinned.

Dependencies

  • Requires a valid Telegram Bot API key credential configured in n8n.
  • The node uses Telegram's Bot API endpoint for unpinning chat messages.
  • No additional external services are required beyond Telegram.

Troubleshooting

  • Invalid Chat ID: If the chat ID is incorrect or the bot is not a member/admin of the chat, the API call will fail. Ensure the bot has appropriate permissions and the chat ID is correct.
  • Invalid Message ID: If the message ID does not exist or is not pinned, the unpin operation may return an error or no effect.
  • Permission Errors: The bot must have rights to manage messages in the chat to unpin messages.
  • API Rate Limits: Frequent unpin operations might hit Telegram API rate limits; handle errors accordingly.
  • Missing Required Parameters: Both Chat ID and Message ID are mandatory; missing either will cause the node to throw an error.

If an error occurs, the node will provide the error message returned by Telegram, which should guide corrective actions.

Links and References

Discussion