Actions26
- Сообщение Actions
- Чат Actions
- Участники чата Actions
- Бот Actions
- Callback Actions
- Видео Actions
Сообщение → Получить список
AI-generatedSummary
Fetches messages from the MAX messenger API, either the latest messages of a chat (with optional count and time range) or specific messages by a list of IDs.
Inputs
- Режим получения (getListMode) — "По ID чата" (byChatId, default) or "По ID сообщений" (byMessageIds). Determines which other fields are used.
- ID чата (getListChatId) (required) — Chat ID to read messages from. Shown only in byChatId mode.
- ID сообщений (getListMessageIds) (required) — Comma-separated message IDs, e.g. mid.1234,mid.5678. Shown only in byMessageIds mode. Passed as-is in the query string.
- Количество (getListCount) — Maximum number of messages to return, 1–100, default 50. byChatId mode only.
- С даты (getListFrom) — Unix timestamp for the start of the period. 0 (default) means no lower bound, and the parameter is not sent. byChatId mode only.
- По дату (getListTo) — Unix timestamp for the end of the period. 0 (default) means no upper bound, and the parameter is not sent. byChatId mode only.
Output shape
One output item per input item, with the raw MAX API JSON response in json. This is typically an object containing the list of messages.
Sends a GET to platform-api.max.ru/messages with chat_id/count/from/to or message_ids, using the maxApi credential. The node does not paginate or split the list into separate items. With Continue On Fail enabled, a failed item yields { error: message }. Parameter values are inserted into the URL without encoding.
Examples
Example 1: Read the last 20 messages of a group chat
Режим: По ID чата; ID чата: -70931657203722; Количество: 20
Example 2: Fetch messages from a chat within a specific day
Режим: По ID чата; ID чата; С даты и По дату: Unix timestamps for the day
Example 3: Look up several known messages
Режим: По ID сообщений; ID сообщений: mid.1234,mid.5678