Search Messages
matrix.search_messages
ActionChat & messagingconnection required
Calls the Matrix API with the connection's credentials.
Full-text search across room events the account can see.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Bearer token
- Providers
- Matrix
- Secret shape
- the account access token, or {"access_token": "…"}
- Config it needs
- base_url, user_id, default_room_id
- Resolved by
- config.connection_id, else node.connection_id
Configuration
6 fields, 1 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 |
|---|---|---|---|---|---|
search_term The text to search for. | string | Yes | — | — | — |
keys Which event fields to search; defaults to all three. | array | No | — | array of string | — |
order_by 'rank' orders by relevance (the server default), 'recent' by time. | string | No | — | one of "rank", "recent" | — |
rooms Limit the search to these room ids, as a JSON array or comma-separated list. | array | No | — | array of string | — |
limit How many results to return in this page. | number | No | — | ≥ 1 | — |
next_batch A next_batch token from a previous search, to fetch the following page. | string | No | — | — | — |
Output
One shape.
result
| Field | Type | Example |
|---|---|---|
results The matching events, most relevant first. | array | — |
results[].rank The server's relevance score. | number | — |
results[].result The matching event. | object | — |
count How many results the server found in total. | number | — |
highlights Words the server suggests highlighting. | array | — |
next_batch Token for the next page, or an empty string. | string | — |
{
"count": 0,
"highlights": [],
"next_batch": "",
"results": [
{
"rank": 0,
"result": {}
}
]
}Notes
- The connection's base_url is the homeserver (e.g. https://matrix.example.org), not the account's server name; the two differ whenever .well-known delegation is in use.
- Rooms are addressed by room id (!abc:server). Resolve a #alias:server with matrix.resolve_room_alias first, or set a default room on the connection.
See Search Messages run in a workflow.
In a technical demo we add the Matrix connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.