Get Channel History
rocketchat.get_channel_history
ActionChat & messagingconnection required
Calls the Rocket.Chat API with the connection's credentials.
Read a page of a channel's messages, newest first, optionally bounded to a time window with oldest and latest.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Rocket.Chat
- Secret shape
- the personal access token, or {"token": "…", "user_id": "…"}
- Config it needs
- base_url, user_id
- Resolved by
- config.connection_id, else node.connection_id
Configuration
7 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
room_id The channel's room id. Give this or a room_name. | string | No | — | — | — |
room_name The channel's name, without the leading '#'. Give this or a room_id. | string | No | — | — | — |
count How many messages to return. Rocket.Chat caps this at the workspace's API_Upper_Count_Limit setting. | number | No | 50 | ≥ 1 | — |
offset How many messages to skip before this page. | number | No | 0 | ≥ 0 | — |
oldest Only messages after this moment, as an ISO-8601 timestamp. | string | No | — | iso8601 format | — |
latest Only messages before this moment, as an ISO-8601 timestamp. Defaults to now, which reads the newest page. | string | No | — | iso8601 format | — |
inclusive Include messages that fall exactly on the oldest or latest boundary. | boolean | No | — | — | — |
- At least one of room_id, room_name must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"count": 50,
"offset": 0
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
messages The matching messages, as Rocket.Chat returned them. | array | — |
count How many messages this page carries. | number | — |
offset The offset this page started at, when the endpoint reports one. | number | — |
total Total matches, when the endpoint reports one. | number | — |
{
"count": 0,
"messages": [],
"offset": 0,
"total": 0
}Notes
- Reads a public channel (Rocket.Chat's channels.* surface). A private group or a direct message is not covered by this endpoint.
See Get Channel History run in a workflow.
In a technical demo we add the Rocket.Chat connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.