Telegram MTProto icon

Telegram MTProto

Full-featured Telegram MTProto client (Pyrogram equivalent)

Message → Get Messages

AI-generated

Summary

Retrieve specific Telegram messages by their IDs from a given chat.

Inputs

  • chatId (required) — The ID, username (@username), or phone number of the chat from which to fetch messages.
  • messageIds (required) — Comma-separated list of message IDs to retrieve.

Output shape

a list of message objects corresponding to the specified IDs

Returns all requested messages as an array. If a message ID does not exist or is inaccessible, it may be omitted or cause an error depending on Telegram API response.

Examples

Example 1: Fetch multiple messages by ID from a specific chat to process or analyze their content within an n8n workflow.

Specify the chatId to identify the chat and provide a comma-separated list of message IDs in messageIds to retrieve those messages.

Discussion