
Matrix Send
CertifiedSend a Matrix room message
Matrix Send
Send a Matrix room message
Posts a m.room.message event to a Matrix room using the Client-Server API send endpoint. payload
is the plain-text message body; msgtype selects how clients render it. The bot account identified by
accessToken must already be a member of roomId — it will not be invited automatically. Does not
support end-to-end encrypted rooms.
type: io.kestra.plugin.matrix.SendExamples
Send a Matrix message on a failed flow execution.
id: unreliable_flow
namespace: company.team
tasks:
- id: fail
type: io.kestra.plugin.scripts.shell.Commands
runner: PROCESS
commands:
- exit 1
errors:
- id: alert_on_failure
type: io.kestra.plugin.matrix.Send
homeserverUrl: "https://matrix.org"
accessToken: "{{ secret('MATRIX_ACCESS_TOKEN') }}"
roomId: "!OGEhHVWSdvArJzumhm:matrix.org"
msgtype: NOTICE
payload: "Matrix Alert: flow {{ flow.id }} failed"
Properties
accessToken *Requiredstring
Bot access token
Matrix access token for the bot account; store as a secret and avoid hardcoding. Obtain it via the login endpoint or Element under Settings > Help & About > Access Token.
homeserverUrl *Requiredstring
Homeserver URL
Base URL of the Matrix homeserver hosting the room, for example https://matrix.org. Matrix is
federated so there is no default — use the homeserver the bot account is registered on.
roomId *Requiredstring
Room ID
Target Matrix room's internal ID, starting with ! (for example !OGEhHVWSdvArJzumhm: matrix.org). Find
it in Element under the room's Settings > Advanced. A room alias (starting with #) is not accepted
here.
msgtype string
TEXTNOTICEEMOTEMessage type
Matrix msgtype for the event: TEXT (m.text, a plain message), NOTICE (m.notice, intended for
automated/bot senders — clients render it distinctly and must never auto-reply to it, which avoids
bot-to-bot loops), or EMOTE (m.emote, an action-style message, e.g. "/me is done"). Defaults to TEXT;
NOTICE is recommended for alerting flows.
options Non-dynamic
Configure Matrix HTTP client
Optional HTTP client overrides for Matrix calls. Leave unset to use the defaults: no connect timeout, a 5m read idle timeout and UTF-8 as the request charset.
io.kestra.plugin.matrix.AbstractConnection-RequestOptions
Connect timeout
Maximum time to establish the connection before failing; unset uses the client default.
UTF-8Request charset
Charset used to encode the request body; defaults to UTF-8.
java.nio.charset.Charset
HTTP headers
Additional HTTP headers to include in every request sent to the homeserver.
PT5MRead idle timeout
Idle time allowed while reading before the connection is closed; defaults to 5m.
payload string
Message payload
Plain-text message body sent as the event's body field. Do not wrap the value in a JSON object;
combine with msgtype to control how Matrix clients render it.