Get Messages
Fetch messages from a session by session id, with optional range and paging.
Type
chat.get-messagesFolder
chatChannels
Any
Pipe
Value
Scope
Any
Get Messages loads messages from a chat session. Use it after Start Chat, Handover, or whenever you already have a session id (for example session.id on a chat workflow).
Configure
| Setting | Description |
|---|---|
| Session ID | Session to read (required). Literal or variable |
| From Message ID | Optional start of the range |
| To Message ID | Optional end of the range |
| Limit | Max messages to return. Default 50, 1–500 |
| Page | Page number. Default 1 |
Handles
| Handle | Role |
|---|---|
| In (target) | Incoming connection |
| Out (source) | Continues after messages are loaded |
Pipe schema
The next block reads this on the data pipe (pipe.value).
| Field | Type | Description |
|---|---|---|
messages | list<Message> | Messages in chronological order |
total | number | How many messages were returned |
Each Message includes:
| Field | Type | Description |
|---|---|---|
id | text | Message id |
from | object | Sender: type (agent or user) and id |
type | text | Kind of message |
content | any | Text or a structured payload |
timestamp | datetime | When it was sent |
Use case
- Load the last messages before Summarize Chat.
- Inspect a range after handover using the start and end message ids on the handover pipe.