Get Room State

matrix.get_room_state
ActionChat & messagingconnection required

Calls the Matrix API with the connection's credentials.

Read a room's whole current state, or the content of one state event when an event type is given.

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

3 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
room_id
The room id, e.g. !AbCdEf:example.org — resolve a #alias:server with matrix.resolve_room_alias first.
stringYes——!AbCdEf:example.org
event_type
One state event type to read, e.g. m.room.topic. Leave blank for the room's whole state.
stringNo——m.room.topic
state_key
The state key within that event type; blank is the usual one, a user id for m.room.member.
stringConditional—only with event_type—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "event_type": "m.room.topic",
  "room_id": "!AbCdEf:example.org"
}

Output

One shape.

result

The provider's response object, as returned.

Extra keys beyond the ones listed can appear.

{}

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.
  • With no event_type the output is {state, count}; with one it is that event's content object exactly as the homeserver returned it.

See Get Room State 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.