Set Room State

matrix.set_room_state
ActionChat & messagingconnection required

Calls the Matrix API with the connection's credentials.

Write a state event — the room's name, topic, avatar, join rules or any custom state type.

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

4 fields, 3 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
The state event type to write, e.g. m.room.topic.
stringYes——m.room.topic
content
The event content as JSON, e.g. {"topic": "Release war room"}.
objectYes—≥ 1 characters{"topic":"Release war room"}
state_key
The state key; leave blank for the usual empty key.
stringNo———

Example configuration

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

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

Output

One shape.

result

FieldTypeExample
event_id
The id of the state event that was written.
string—
room_id
The room the state belongs to.
string—
{
  "event_id": "",
  "room_id": ""
}

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 Set 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.