Actions28
- Message Actions
- Chat Actions
- Contact Actions
- Session Actions
- Media Actions
- Storage Actions
- Webhook Actions
- Ticket Actions
Chat → Get History
AI-generatedSummary
Retrieves the message history of a single WhatsApp chat (identified by the counterpart's phone number) for a chosen WAOtomatis session, returning one n8n item per message.
Inputs
- Session (required) — The connected WhatsApp number (session) to read from. Pick from a searchable list or enter the session ID (letters, digits, underscore, hyphen) or an expression.
- Chat ID (required) — Counterpart phone number in E.164 digits (e.g. 628123456789). It is URL-encoded into the request path.
- Return All — If true, pages through every cursor (100 per request) until no more results. Default false.
- Limit — Max number of messages to return when Return All is off. Default 50, minimum 1.
Output shape
A list of items, one per message, each containing the message object exactly as returned in the API's data array. Each item is paired with its input item.
Calls GET /v1/sessions/{sessionId}/chats/{chatId}/messages with cursor pagination. The exact message fields come from the WAOtomatis API and are not defined in the node. An empty history produces no output items. With Continue On Fail, errors become an item with an
errormessage. API errors include the error code.
Examples
Example 1: Fetch the last 50 messages with a customer to give an AI agent context
Session: choose from list; Chat ID: {{ $json.from }}; Return All: off; Limit: 50
Example 2: Export a full conversation archive
Session: By ID; Chat ID: 628123456789; Return All: on
