Resources · n8n integration

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

Why automate

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.

Connect

How do you connect Matrix to n8n?

  1. 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.

  2. 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.

  3. 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.

Actions

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.

Resources × operations matrix
ResourceCreateGetGet ManyInviteJoinKickLeaveMeUpload
Account✓
Event✓
Media✓
Message✓✓
Room✓✓✓✓✓
Room Member✓

Account

1 operation
01

Get the current user's account information

account.me

What 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.

Use cases
put it first in a new workflow and run it once. If it returns the bot account you expected, the token and the homeserver URL agree with each other, and you can move on to the operations that actually write something.

Event

1 operation
02

Get an event by ID

event.get

What 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.org form.
  • Event ID: the event itself, written like $1234abcd:matrix.org, often passed as {{ $json.eventId }} from the node that created it.
Use cases
an approval flow stores the event ID of the message it posted, then reads that event later to attach the original wording to the ticket it opens.

Media

1 operation
03

Upload media to a chatroom

media.upload

What 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, data in 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.
Use cases
a nightly export posts the generated invoice PDF to the finance room.

Message

2 operations
04

Create a message

message.create

What 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.
Use cases
a monitoring workflow posts a Notice, read as machine output.
05

Get many messages

message.getAll

What 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.
Use cases
an end of quarter archive walks the support room with Return All enabled and writes every message to a sheet.

Room

5 operations
06

Create a room

room.create

What 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-around that people can join instead of the raw ID.
Use cases
a new signup in your CRM spawns a dedicated onboarding room named after the customer, created private, with the alias derived from the account name.
07

Invite a room

room.invite

What 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 }}.
Use cases
right after a project room is created, a loop invites every member of the project from a list, one execution item per person, so nobody is added by hand.
08

Join a room

room.join

What 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.
Use cases
a setup workflow runs once after someone invites the bot, joins every room in a list of aliases, and leaves the account ready to post.
09

Kick a user from a room

room.kick

What 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.
Use cases
an offboarding workflow reads the leavers of the week and clears each one from the customer rooms they had access to, with the ticket number as the reason.
10

Leave a room

room.leave

What 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.
Use cases
a cleanup workflow runs monthly, looks at the rooms tied to closed projects, and has the automation account leave each one so the bot's room list stays short and its sync stays fast.

Room Member

1 operation
11

Get many room members

roomMember.getAll

What 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.
Use cases
a quarterly access review lists every room with Membership set to Join and compares it against the HR export before anyone gets kicked.
Need help

Need help automating Matrix with n8n?

A person reads every message.

FAQ

Matrix and n8n, the questions that come up

01Is the Matrix n8n integration free?
Yes. The Matrix node ships with n8n, so there is nothing to install and nothing extra to pay on the n8n side. It behaves the same on n8n Cloud, the hosted offer run by n8n, and on an instance you host yourself with Docker or npm under the Community Edition and its Sustainable Use license. A workflow built on one runs on the other without changes. What you pay for Matrix itself depends on your homeserver: an account on a public server or a server your company operates is a separate question from n8n, and the node makes no difference between them.
02What credentials do you need for the Matrix node?
One credential, built from two values. An Access Token, tied to the account you log into Matrix with, and a Homeserver URL, the address of the server where that account lives. Most clients expose both under Settings, then Help and About, then Advanced, but the path varies from one client to another so check its documentation. n8n prefills the homeserver field with matrix.org, which you change if your account sits elsewhere. There is no authentication selector on the node: this token is the only supported method. Create the credential once in the Credentials menu and every Matrix node reuses it.
03What are the limits of the Matrix node in n8n?
It depends on what you need. The node covers 11 operations across 6 resources, which is messaging, media, room lifecycle and membership. Reading history is paginated: with Return All off, you only get up to Limit, and long rooms need it on. Anything the client API offers beyond those operations is not in the node, and that includes reactions, read receipts and encryption key handling. In that case the HTTP Request node calls the Matrix endpoint directly and reuses the same credential through predefined authentication, so you keep one token and one homeserver URL for the whole workflow.
04Does the Matrix node react to new messages in real time?
No, because there is no Matrix trigger node in n8n. Nothing on the Matrix side can start a workflow by itself, so the run has to begin somewhere else. Three patterns cover most needs. A Schedule Trigger fires at a fixed interval and reads the room with Get many messages, which is polling, meaning n8n asks again on a timer rather than being notified. An n8n Webhook gives you a URL that another service calls when something happens. Or another app's trigger starts the chain and Matrix is simply where the result is posted.
05n8n or Make for Matrix?
It depends on three things. Hosting: n8n runs on your own server or on n8n Cloud, while Make is hosted only, so if your Matrix homeserver sits inside your network for data control reasons, matching that with a self-hosted automation tool keeps the whole chain in house. Cost model: Make bills per operation, which adds up when a workflow loops over every member of a room, whereas a self-hosted n8n does not count them. Visual logic: both build flows visually and both are pleasant to read. Try the one whose pricing shape matches your volume.