
MATRIX n8n INTEGRATION: AUTOMATE MATRIX WITH N8N
Looking to automate Matrix with n8n? You're in the right place. Matrix, the open-source decentralized communication protocol, becomes even more powerful when connected to n8n's automation capabilities. This integration gives you access to 11 distinct actions covering room management, messaging, media handling, and account operations.
With the Matrix n8n integration, you can programmatically create rooms, send messages, manage memberships, upload media, and retrieve events—all without writing custom code. Whether you're building internal communication bots, automating team notifications, or synchronizing Matrix with your other business tools, this integration handles the heavy lifting.
In this guide, you'll discover every available action, understand how to configure each parameter, and learn practical use cases to maximize your Matrix automation workflows.
Need help automating Matrix with n8n?
Our team will get back to you in minutes.
Why automate Matrix with n8n?
The Matrix n8n integration gives you access to 11 powerful actions spanning room management, messaging, membership control, and media operations. This means you can automate virtually every aspect of your Matrix communication infrastructure directly from n8n's visual workflow builder.
The benefits are substantial. Time savings come from eliminating manual room creation, repetitive message sending, and tedious membership management. Instead of logging into Matrix to invite team members or post updates, your workflows handle it automatically. Improved responsiveness is achieved by triggering Matrix messages based on external events—a new support ticket, a deployment completion, or a CRM update can instantly notify the right room. Seamless integration connects Matrix to over 400 applications in n8n, making your communication hub the central nervous system of your operations.
Concrete workflow examples include: automatically posting deployment notifications to your DevOps room when CI/CD pipelines complete, creating dedicated project rooms when new projects are added to your project management tool, kicking inactive users based on activity data from other systems, or uploading reports as media files to specific channels. The possibilities expand dramatically when Matrix becomes part of your automated ecosystem.
How to connect Matrix to n8n?
! 1 stepHow to connect Matrix to n8n?
- 01
Add the node
Search and add the node in your workflow.
TIP💡 TIP: If you're running a self-hosted Matrix server, ensure your homeserver URL is accessible from your n8n instance. For production workflows, consider creating a dedicated Matrix account for automation purposes rather than using your personal account—this improves security and makes it easier to track automated actions in room histories.- 01
Need help automating Matrix with n8n?
Our team will get back to you in minutes.
Matrix actions available in n8n
01 Action 01Room Member - Get Many
This action retrieves multiple members from a specified Matrix room, giving you programmatic access to membership lists. It's particularly useful for auditing room participation, synchronizing member data with external systems, or building conditional workflows based on who's present in a room.
Key parameters: Credential to connect with (dropdown selection for your Matrix account credentials—required for authentication), Resource (set to "Room Member" to target membership data), Operation ("Get Many" retrieves multiple members rather than a single user), Room Name or ID (text field where you specify the target room by name or unique ID—required), and Filters (optional section to narrow down results based on specific criteria).
Use cases: Export room membership to a spreadsheet for compliance reviews, trigger welcome messages when new members join, or cross-reference Matrix room members with your HubSpot CRM data to detect access discrepancies.

02 Action 02Leave Room
The Leave Room action programmatically removes the authenticated user from a specified Matrix room. This is essential for cleanup workflows, temporary access scenarios, or automated room rotation strategies.
Key parameters: Credential to connect with (select your Matrix credentials—required), Resource (set to "Room" for room-level operations), Operation ("Leave" removes your bot/user from the room), and Room Name or ID (specify which room to leave—required).
Use cases: Automatically leave project rooms when projects close in your PM tool, exit announcement channels after a set period, or clean up bot presence from rooms that are no longer active.

03 Action 03Kick
The Kick action forcibly removes a user from a Matrix room with an optional reason. This moderation tool is invaluable for automated community management, security enforcement, or access control workflows.
Key parameters: Credential to connect with (your authorized Matrix credentials—required), Resource ("Room" indicates room-level action), Operation ("Kick" removes the specified user), Room Name or ID (target room identifier—required), User ID (the Matrix user ID to kick, e.g.,
@username:matrix.org—required), and Reason (optional text explaining why the user was removed).Use cases: Automatically kick users who violate community guidelines detected by moderation tools, remove team members from project rooms when they're reassigned, or enforce time-limited access by kicking users after a deadline passes.

04 Action 04Join Room
This action makes the authenticated user join a specified Matrix room by its ID or alias. It's the foundation for building bots that participate in conversations or for automating presence in dynamic room structures.
Key parameters: Credential to connect with (Matrix credentials for authentication—required), Resource ("Room" for room operations), Operation ("Join" adds your user to the room), and Room ID or Alias (the unique identifier or alias of the room to join—required).
Use cases: Have your automation bot join newly created project rooms automatically, join public announcement rooms based on topic subscriptions, or rejoin rooms after server maintenance.

05 Action 05Invite
The Invite action sends a room invitation to a specified Matrix user, enabling automated onboarding and access management workflows.
Key parameters: Credential to connect with (Matrix account credentials—required), Resource ("Room" for room-level operations), Operation ("Invite" sends the invitation), Room Name or ID (the room to invite the user to—required), and User ID (the Matrix ID of the user to invite, e.g.,
@user:matrix.org—required).Use cases: Automatically invite new employees to relevant team rooms when they're added to your HR system, send project room invitations when tasks are assigned, or invite external collaborators when contracts are signed in your CRM.

06 Action 06Matrix - Room Create
Create new Matrix rooms programmatically with customizable names, presets, and aliases. This action is perfect for dynamic room generation based on business events.
Key parameters: Credential to connect with (Matrix credentials—required), Resource ("Room" for room creation), Operation ("Create" generates a new room), Room Name (human-readable name for the room—required), Preset (dropdown to select room type, e.g., "Public Chat", "Private Chat", "Trusted Private Chat"), and Room Alias (optional unique alias for easier room discovery).
Use cases: Create dedicated rooms for each new client or project automatically, spin up incident response rooms when monitoring alerts trigger, or generate event-specific discussion rooms when calendar events are created.

07 Action 07Get Many
Retrieve multiple messages from a Matrix room for analysis, archiving, or processing. This action enables conversation monitoring and data extraction workflows.
Key parameters: Credential to connect with (Matrix credentials—required), Resource ("Message" for message operations), Operation ("Get Many" retrieves multiple messages), Room Name or ID (source room for messages—required), Return All (toggle to fetch all available messages or limit results), Limit (number specifying maximum messages to return, e.g., 100), and Other Options (additional parameters for customization).
Use cases: Archive room conversations to external storage, analyze message patterns for engagement metrics, extract action items or keywords from discussions, or sync conversations to ticketing systems.

08 Action 08Create Message
Send text messages to Matrix rooms programmatically. This is the core action for notifications, alerts, and automated communication.
Key parameters: Credential to connect with (Matrix credentials—required), Resource ("Message" for messaging operations), Operation ("Create" sends a new message), Room Name or ID (destination room—required), Text (the message content—required), Message Type (dropdown, typically "Text"—required), and Message Format ("Plain Text" or other formatting options).
Use cases: Post deployment notifications to DevOps rooms, send daily standup reminders, broadcast system alerts when monitoring thresholds are crossed, or deliver personalized updates based on CRM events.

09 Action 09Matrix - Media Upload
Upload media files (images, documents, etc.) to Matrix rooms, enabling rich content sharing in automated workflows.
Key parameters: Credential to connect with (Matrix credentials—required), Resource ("Media" for media operations), Operation ("Upload" sends files to Matrix), Room Name or ID (target room for the upload—required), Input Binary Field (name of the binary data field containing the file, e.g., "data"—required), Media Type (dropdown specifying file type: Image, File, etc.), and Additional Fields (optional extra configurations).
Use cases: Automatically share generated reports to team rooms, post screenshots from monitoring tools when issues occur, distribute marketing assets to relevant channels, or upload receipts and documents from form submissions.

10 Action 10Get Event
Retrieve detailed information about a specific Matrix event by its ID. This action is useful for verification workflows, audit trails, and event-driven processing.
Key parameters: Credential to connect with (Matrix credentials—required), Resource ("Event" for event operations), Operation ("Get" retrieves event details), Room ID (the room containing the event—required), and Event ID (unique identifier of the event to fetch—required).
Use cases: Verify message delivery by checking event status, build audit logs by retrieving event metadata, or create reply chains by fetching original messages.

Build your first workflow with our team
Drop your email and we'll send you the catalog of automations you can ship today.
- Free n8n & Make scenarios to import
- Step-by-step setup docs
- Live cohort + community support
Frequently asked questions
Is the Matrix n8n integration free to use?
Yes, the Matrix n8n integration is completely free. Both Matrix (as an open-source protocol) and n8n's self-hosted version are free to use. If you use n8n Cloud, pricing depends on your plan, but the Matrix nodes themselves carry no additional cost. You'll need access to a Matrix homeserver (matrix.org offers free accounts, or you can self-host), and your n8n instance must be able to reach your homeserver's API endpoints. This makes Matrix one of the most cost-effective communication platforms to automate.Can I send formatted messages through the Matrix n8n integration?
Absolutely. The Create Message action includes a "Message Format" parameter that allows you to choose between Plain Text and HTML formatting. With HTML, you can include bold text, links, lists, and other rich formatting in your automated messages. This is particularly useful for notification messages where you want to highlight key information or include clickable links to relevant resources. Keep in mind that formatting support may vary slightly depending on the Matrix client recipients use.How do I handle Matrix room IDs vs. room aliases in n8n?
Matrix rooms have both internal IDs (starting with !, like !abc123:matrix.org) and optional human-readable aliases (starting with #, like #myroom:matrix.org). Most n8n Matrix actions accept either format in the "Room Name or ID" field. Room IDs are more reliable since they never change, while aliases can be reassigned. For production workflows, it's best practice to use room IDs to avoid issues if aliases are modified. You can find a room's internal ID in your Matrix client's room settings under "Advanced" or similar options. For more complex automation needs, explore the official n8n Matrix documentation.



