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

ActionWhat it does
Create roomCreate a room without encryption and invite people to it.
Delete messageRemove a message from a room, wiping its words for everyone.
Get messagesGet a room's most recent messages, newest first.
Invite to roomInvite someone to a room by their Matrix ID.
Join roomJoin a public room, or one the account was invited to.
Leave roomLeave a room.
List membersList the people in a room.
List roomsList the rooms the account is in, with their names and whether they're encrypted.
Remove from roomRemove someone from a room.
Send messagePost a message to a room.
Set room topicChange a room's topic, such as to show the current status.

Create room

Create a room without encryption and invite people to it.

Inputs

NamenametextRequired
The room's name, such as Ops alerts.
Topictopictext
What the room is for.
Who can joinaccesstext
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.
Addressaddresstext
A short name for its address, such as ops-alerts for #ops-alerts:matrix.org.
Inviteinvitelist
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

RoomroomtextRequired
The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
Messageevent_idtextRequired
The message's event ID, starting with $, from 'Send message' or 'Get messages'.
Reasonreasontext
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

RoomroomtextRequired
The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
How manylimitnumber
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

RoomroomtextRequired
The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
PersonusertextRequired
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

RoomroomtextRequired
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

RoomroomtextRequired
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

RoomroomtextRequired
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

RoomroomtextRequired
The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
PersonusertextRequired
The person to remove. Pick one, or give their Matrix ID.
Reasonreasontext
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

RoomroomtextRequired
The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
MessagemessagetextRequired
What to say. Markdown such as **bold** and [links](https://example.com) works.
Send assend_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.
Formattingformattingtext
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

RoomroomtextRequired
The room. Pick one, or give its ID (!abc:matrix.org) or address (#name:matrix.org).
TopictopictextRequired
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"
}

On this page