Send Message

matrix.send_message
ActionChat & messagingconnection required

Calls the Matrix API with the connection's credentials.

Post a text message to a room, optionally as HTML or as a rich reply.

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.

FieldTypeRequiredDefaultConstraintsExample
room_id
The room id, e.g. !AbCdEf:example.org. Falls back to the connection's default room; resolve a #alias:server with matrix.resolve_room_alias.
stringNo——!AbCdEf:example.org
body
The plain-text message; also the fallback shown by clients that cannot render the HTML body.
stringYes———
msgtype
m.text is an ordinary message, m.notice marks it as sent by a bot, m.emote is an /me action.
stringNom.textone of "m.text", "m.notice", "m.emote"—
formatted_body
Optional HTML body, sent as org.matrix.custom.html.
stringNo———
reply_to_event_id
Send this as a rich reply to that event id. This is a reply, not a thread: clients show it quoted in the main timeline.
stringNo———
txn_id
Transaction id that makes this send idempotent — the same id never posts twice. Leave blank for a fresh id on every attempt.
stringNo———

Example configuration

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

{
  "msgtype": "m.text",
  "room_id": "!AbCdEf:example.org"
}

Output

One shape.

result

FieldTypeExample
event_id
The id of the event that was sent.
string$abc123:example.org
room_id
The room the event was sent to.
string—
txn_id
The transaction id used; resend with it to avoid a duplicate.
string—
{
  "event_id": "$abc123:example.org",
  "room_id": "",
  "txn_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 Send Message 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.