Matrix n8n integrationAutomate Matrix with n8n.
Your workflows can post to Matrix the same way a teammate would. The Matrix n8n integration ships with the tool and exposes 11 operations across 6 resources: account, event, media, message, room and room member. There is no Matrix trigger, so another node starts the run.
Verified Trustpilot reviews · AI, automation & growth agency
What does the Matrix n8n integration actually give you?
The Matrix n8n integration is the built-in Matrix node, which talks to your homeserver through the client API using an access token. It covers what a bot account needs on a day to day basis: send a message or a file to a room, read back the history of a room, create rooms, invite, join, kick, leave, and list who is in a room. Matrix stays your chat layer, n8n becomes the hand that operates it.
A first scenario: the alert that lands in the right room. A workflow watches a source, formats a short summary, and calls message.create on a private ops room. Because Matrix federates across homeservers, the same workflow reaches an internal server and a public matrix.org account without a second integration to maintain.
A second one: the report that arrives as a file. A scheduled export produces a PDF or a spreadsheet, and media.upload pushes the binary straight into the room, so nobody has to open an inbox to read the weekly numbers. Teams that already pipe their numbers through Google Sheets usually keep the sheet as the source and let Matrix carry the notification.
A third one: room lifecycle without a human admin. room.create opens a room per project or per customer, room.invite pulls the right people in, and room.kick closes access when the project ends. Pair it with roomMember.getAll and you can audit who still sits in which room.
Matrix is one option among several for notifications. If your audience already lives in Slack, Telegram or Discord, those nodes do the same job on their own network, and nothing stops a workflow from posting to two of them in parallel.
Know the edges before you build. The node has no trigger, so it never listens on its own: a Schedule Trigger, an n8n Webhook (a URL n8n exposes so another service can call your workflow) or another app's trigger starts the run. Presence, encryption keys, reactions and read receipts are not exposed either. When the Matrix client API offers something the node does not, the HTTP Request node calls that endpoint directly and reuses the same Matrix credential, so you keep one set of secrets. For a wider look at where the platform fits, the n8n review goes through it in detail.
How do you connect Matrix to n8n?
- 01
Create the Matrix account the workflow will use
You need an account on a Matrix server, on matrix.org or on a homeserver your company runs. Use a dedicated account rather than a personal one: every message the workflow sends will carry that identity, and the access token stays valid until the account revokes it. Give it a name your team will recognize in a room member list, because that is what people see when the automation posts.
- 02
Collect the access token and the homeserver URL
Two values open the connection. The Access Token is tied to the account you log into Matrix with. The Homeserver URL is the address of the homeserver you picked when you created the account. In most clients both sit under Settings > Help & About > Advanced, though the exact path depends on the client you use, so check its own documentation if the menu differs.
- 03
Save the credential once in n8n
In n8n, open the Credentials menu and create a Matrix credential, which is the stored login the node reuses. Paste the token, then the homeserver URL: n8n prepopulates that field with matrix.org's own server, so change it if you self-host. Save it once and every Matrix node in every workflow picks it from a dropdown, with nothing to retype and no secret sitting in a node parameter.
What can the Matrix node do?
The Matrix node exposes 11 operations across 6 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.
| Resource | Create | Get | Get Many | Invite | Join | Kick | Leave | Me | Upload |
|---|---|---|---|---|---|---|---|---|---|
| Account | ✓ | ||||||||
| Event | ✓ | ||||||||
| Media | ✓ | ||||||||
| Message | ✓ | ✓ | |||||||
| Room | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| Room Member | ✓ |
Operations index
Account
1 operationGet the current user's account information
account.meWhat you see in n8n
Notes & use cases
Reads back the account information of the user the access token belongs to. There is nothing to configure: the node answers for whichever Matrix account issued the token, which makes it the cheapest way to prove a credential works.
Event
1 operationGet an event by ID
event.getWhat you see in n8n
Notes & use cases
Fetches a single event from a room by its identifier, which is how you go back to one specific message, membership change or file after the fact.
Key parameters
- Room ID: the room the event belongs to, in the
!123abc:matrix.orgform. - Event ID: the event itself, written like
$1234abcd:matrix.org, often passed as{{ $json.eventId }}from the node that created it.
Media
1 operationUpload media to a chatroom
media.uploadWhat you see in n8n
Notes & use cases
Sends a file that is already in the workflow as binary data into a room, so a document, a screenshot or an audio clip lands in the conversation instead of an inbox.
Key parameters
- Room Name or ID: pick the room from the list, or pass an ID with an expression, the n8n syntax that reads a value from the previous node.
- Input Binary Field: the name of the binary field holding the file,
datain most download nodes. - Media Type: File, Image, Audio or Video, which decides how the Matrix client renders it.
- File Name: optional, sets the name people see on the attachment.
Message
2 operationsCreate a message
message.createWhat you see in n8n
Notes & use cases
Posts a message to a room. Most workflows end on it, with four optional settings that change how the text looks.
Key parameters
- Room Name or ID: the destination, chosen from the list or given as
!123abc:matrix.org. - Text: the body to send, for example
Hello from n8n!or an expression built from the previous node. - Message Type: Text for a normal message, Notice for something a bot should not be replied to, Emote for an action.
- Message Format: Plain Text, or HTML when you want links and bold.
- Fallback Text: the plain version shown when a client cannot render the HTML.
Get many messages
message.getAllWhat you see in n8n
Notes & use cases
Pulls the message history of a room back into the workflow, one item per event, which turns a conversation into data you can count, search or archive.
Key parameters
- Room Name or ID: the room to read.
- Return All: on, n8n pages through the room until it runs out of events; off, it stops at Limit.
- Filter: a JSON RoomEventFilter, for instance
{"contains_url":true}to keep only events carrying a link.
Room
5 operationsCreate a room
room.createWhat you see in n8n
Notes & use cases
Opens a new room on the homeserver and returns its ID, which the next nodes reuse to invite people or post the first message.
Key parameters
- Room Name: what the room is called, for example
My new room. - Preset: Private Chat, or Public Chat for an open and public room. This decides who can walk in.
- Room Alias: optional, a readable handle such as
coolest-room-aroundthat people can join instead of the raw ID.
Invite a room
room.inviteWhat you see in n8n
Notes & use cases
Sends a room invitation to one Matrix user. The person still has to accept, so this is an offer rather than a forced membership.
Key parameters
- Room Name or ID: the room to invite into.
- User ID: the fully qualified ID of the invitee, written
@cheeky_monkey:matrix.org, usually read from your directory with{{ $json.matrixId }}.
Join a room
room.joinWhat you see in n8n
Notes & use cases
Makes the account behind the credential join a room itself. A bot that was invited stays outside until this runs, and a node cannot post into a room its account has not joined.
Key parameters
- Room ID or Alias: either form works here, the raw ID or the readable alias, which makes this the one room operation you can drive from a name you typed yourself.
Kick a user from a room
room.kickWhat you see in n8n
Notes & use cases
Removes someone from a room. The account behind the credential needs the rights to do it, and the person can be invited again later, so this is not a ban.
Key parameters
- Room Name or ID: the room to remove them from.
- User ID: the fully qualified user ID of the person.
- Reason: optional text stored with the removal, such as
Telling unfunny jokes.
Leave a room
room.leaveWhat you see in n8n
Notes & use cases
The bot account walks out of a room on its own. Nothing is deleted, the room and its history stay for the other members, and the account simply stops receiving what happens there.
Key parameters
- Room Name or ID: the room to leave, picked from the list or given as an expression.
Room Member
1 operationGet many room members
roomMember.getAllWhat you see in n8n
Notes & use cases
Lists the people attached to a room, one item per member, with their membership state. It is the read side of invite, kick and leave.
Key parameters
- Room Name or ID: the room to inspect.
- Membership: keep only Join, Invite, Leave or Ban, or Any to keep everyone.
- Exclude Membership: the mirror filter, to drop one state instead of keeping one.
Need help automating Matrix with n8n?
A person reads every message.

