Matrix
App · 11 actions
Post to and manage Matrix rooms on any homeserver: send and read messages, create and join rooms, set topics, and invite and remove people. Start a workflow when a message is posted in a room.
Actions
| Action | What it does |
|---|---|
| Create room | Create a room without encryption and invite people to it. |
| Delete message | Remove a message from a room, wiping its words for everyone. |
| Get messages | Get a room's most recent messages, newest first. |
| Invite to room | Invite someone to a room by their Matrix ID. |
| Join room | Join a public room, or one the account was invited to. |
| Leave room | Leave a room. |
| List members | List the people in a room. |
| List rooms | List the rooms the account is in, with their names and whether they're encrypted. |
| Remove from room | Remove someone from a room. |
| Send message | Post a message to a room. |
| Set room topic | Change a room's topic, such as to show the current status. |
Create room
Create a room without encryption and invite people to it.
Inputs
- Name
nametextRequired - The room's name, such as Ops alerts.
- Topic
topictext - What the room is for.
- Who can join
accesstext - Only people invited, or anyone with the address. Defaults to only people invited.One of:
private(Private (invite only)),public(Public (anyone can join)). Default:private. - Address
addresstext - A short name for its address, such as ops-alerts for #ops-alerts:matrix.org.
- Invite
invitelist - Matrix IDs of people to invite, such as @sam:matrix.org.
Outputs
addresstext- Its address, such as #team:matrix.org; empty if none
encryptedtrue/false- True when it is end-to-end encrypted
nametext- Its name
room_idtext- The room's ID
topictext- Its topic
Example output
{
"address": "#ops-alerts:matrix.org",
"encrypted": false,
"name": "Ops alerts",
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org",
"topic": "Alerts from our workflows"
}Delete message
Remove a message from a room, wiping its words for everyone.
Inputs
- Room
roomtextRequired - The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
- Message
event_idtextRequired - The message's event ID, starting with $, from 'Send message' or 'Get messages'.
- Reason
reasontext - Why it was removed, shown in its place.
Outputs
deletedtrue/false- True once removed
event_idtext- The removed message's event ID
redaction_idtext- The ID of the removal itself
room_idtext- The room
Example output
{
"deleted": true,
"event_id": "$9fGh2sKpQwErTyUi0oPlKjHgFdSaZxCv",
"redaction_id": "$Qw3rTy8uIoPaSdFgHjKlZxCvBnM",
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org"
}Get messages
Get a room's most recent messages, newest first.
Inputs
- Room
roomtextRequired - The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
- How many
limitnumber - How many messages. Defaults to 20.From 1 to 100.
Outputs
countnumber- How many messages
messageslist- The messages, newest first
room_idtext- The room
Example output
{
"count": 1,
"messages": [
{
"event_id": "$9fGh2sKpQwErTyUi0oPlKjHgFdSaZxCv",
"kind": "text",
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org",
"sender": "@sam:matrix.org",
"sent_at_ms": 1793095200000,
"text": "Deploy finished"
}
],
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org"
}Invite to room
Invite someone to a room by their Matrix ID.
Inputs
- Room
roomtextRequired - The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
- Person
usertextRequired - Their Matrix ID, such as @sam:matrix.org.
Outputs
invitedtrue/false- True once invited
room_idtext- The room
usertext- Who was invited
Example output
{
"invited": true,
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org",
"user": "@sam:matrix.org"
}Join room
Join a public room, or one the account was invited to.
Inputs
- Room
roomtextRequired - The room's address (#name:matrix.org) or ID (!abc:matrix.org).
Outputs
addresstext- Its address, such as #team:matrix.org; empty if none
encryptedtrue/false- True when it is end-to-end encrypted
nametext- Its name
room_idtext- The room's ID
topictext- Its topic
Example output
{
"address": "#ops-alerts:matrix.org",
"encrypted": false,
"name": "Ops alerts",
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org",
"topic": "Alerts from our workflows"
}Leave room
Leave a room.
Inputs
- Room
roomtextRequired - The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
Outputs
lefttrue/false- True once left
room_idtext- The room left
Example output
{
"left": true,
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org"
}List members
List the people in a room.
Inputs
- Room
roomtextRequired - The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
Outputs
countnumber- How many members
memberslist- The people in it
room_idtext- The room
Example output
{
"count": 1,
"members": [
{
"display_name": "Sam",
"user": "@sam:matrix.org"
}
],
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org"
}List rooms
List the rooms the account is in, with their names and whether they're encrypted.
Inputs
None.
Outputs
countnumber- How many rooms
roomslist- The rooms, by name
Example output
{
"count": 1,
"rooms": [
{
"address": "#ops-alerts:matrix.org",
"encrypted": false,
"name": "Ops alerts",
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org",
"topic": "Alerts from our workflows"
}
]
}Remove from room
Remove someone from a room. They can join again if invited.
Inputs
- Room
roomtextRequired - The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
- Person
usertextRequired - The person to remove. Pick one, or give their Matrix ID.
- Reason
reasontext - Why, shown to them and the room.
Outputs
removedtrue/false- True once removed
room_idtext- The room
usertext- Who was removed
Example output
{
"removed": true,
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org",
"user": "@sam:matrix.org"
}Send message
Post a message to a room.
Inputs
- Room
roomtextRequired - The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
- Message
messagetextRequired - What to say. Markdown such as **bold** and [links](https://example.com) works.
- Send as
send_astext - A message, or a notice, the kind bots send. Defaults to a message.One of:
text(Message),notice(Notice (from a bot, no notification sound)). Default:text. - Formatting
formattingtext - Read the message as Markdown or as plain text. Defaults to Markdown.One of:
markdown(Markdown (bold, links, lists)),plain(Plain text). Default:markdown.
Outputs
event_idtext- The message's event ID, for 'Delete message'
room_idtext- The room it was sent to
senttrue/false- True once sent
Example output
{
"event_id": "$9fGh2sKpQwErTyUi0oPlKjHgFdSaZxCv",
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org",
"sent": true
}Set room topic
Change a room's topic, such as to show the current status.
Inputs
- Room
roomtextRequired - The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
- Topic
topictextRequired - The new topic.
Outputs
event_idtext- The change's event ID
room_idtext- The room
topictext- Its new topic
Example output
{
"event_id": "$Zx8cVbNmAsDfGhJkLqWeRtYuIo",
"room_id": "!kBzNxRnXvLqHtYwPJa:matrix.org",
"topic": "All systems normal"
}