Automate Matrix Room Creation and Member Invites with n8n

Struggling to manually create Matrix chat rooms, invite members from other rooms, and send welcome messages? This n8n workflow automates the process entirely, saving you hours and reducing human error by managing room creation, inviting members, and messaging seamlessly.
matrix
if
manualTrigger
+1
Workflow Identifier: 1623
NODES in Use: Manual Trigger, Matrix, If, NoOp
Automate Matrix room creation with n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Automation Does

This workflow creates a new Matrix room automatically, invites members from another room to it, and sends a welcome message. 

This solves the problem of spending hours manually setting up rooms, inviting users, and messaging. 

When it runs, it saves time and stops mistakes like missing invites or unclear messages.


How This Workflow Works – Input, Process, Output

Inputs

  • Room name and alias for the new Matrix room.
  • Room ID of an existing Matrix room to copy members from.
  • Matrix account API credentials named “matrixApi” configured in n8n.

Processing Steps

  • Create a new Matrix room with the specified name and alias.
  • Fetch details of the current logged-in user to avoid re-inviting self.
  • Get list of all members from the existing room.
  • Filter out the current user from members list.
  • Invite each remaining member to the newly created room.
  • Send a welcome message to the new room.
  • Use conditional logic with If and NoOp nodes to manage invitations and workflow cleanly.

Output

  • New Matrix room is ready with invited members.
  • A welcome message is posted in the new room.

Beginner Step-by-Step: How to Use This Workflow in n8n

Importing the Workflow

  1. Download the workflow file from the “Download” button on this page.
  2. Open the n8n editor where the workflow will run.
  3. Go to “Import from File” in n8n and upload the downloaded workflow file.

Configuring the Workflow

  1. Add the required Matrix API credentials named “matrixApi” if not set.
  2. Update the room name and alias in the node that creates the new Matrix room.
  3. Set the Room ID of the existing Matrix room you want to copy members from.
  4. Optionally customize the welcome message text in the last Matrix node.

Testing and Activation

  1. Test the workflow by pressing Execute inside n8n.
  2. Check the new room has been created, members invited, and the welcome message appears.
  3. Once satisfied, activate the workflow to run on demand or via other triggers.
  4. If hosting n8n yourself, see self-host n8n for useful help.

Who Should Use This Workflow

This automation fits team managers or community leaders who handle many Matrix rooms.

It is helpful for people who want to avoid tedious room setup, save three or more hours per project, and reduce mistakes with invites and messages.


Tools and Services Used

  • n8n: Automation platform used to build and run the workflow.
  • Matrix API: Used through Matrix nodes for room management and messaging.

Customization Ideas

  • Change the room name and alias to match new projects or communities.
  • Write your own welcome message in the last Matrix node.
  • Add extra conditions to invite only specific users based on roles or attributes.
  • Replace the Manual Trigger with a Webhook node for external starting.
  • Add logging nodes to record who got invited for tracking.

Troubleshooting Common Issues

“user_id” Missing or Undefined

Check Matrix node credentials for accuracy.

Ensure API access has correct rights.

Invitations Not Sent

Verify the If node conditions correctly compare current user and members.

Use correct JSON paths for user_id fields from nodes.

Matrix API Rate Limits or Errors

Check if too many invites go out too fast.

Add delays or batch invites to respect limits and permission rules.


Pre-Production Checklist

  • Verify Matrix API credentials named “matrixApi” are set correctly in n8n.
  • Run and test each Matrix node individually for expected response.
  • Make sure new room alias and name do not exist already.
  • Test invites on a trial room to confirm If node filtering works.
  • Back up workflow versions before active deployment.

Deployment Guide

Activate the workflow in n8n once tests pass.

Monitor executions and logs to catch errors early.

Optionally add notification or alert nodes for issue awareness.


Summary

✓ Saves 3+ hours on room creation and invites.

✓ Avoids invite mistakes by automating user filtering.

✓ Ensures new Matrix rooms start with invited users and clear welcome messages.

✓ Easy to import and configure inside n8n for production use.


Automate Matrix room creation with n8n

Visit through Desktop to Interact with the Workflow.

Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Frequently Asked Questions

Download the workflow file and use the ‘Import from File’ option in n8n editor to load the workflow.
The If node checks that members invited are not the current user to avoid self-invites.
Currently, the workflow invites members from one specified room but can be extended to multiple rooms with extra nodes.
Add delays or error handling nodes to slow invite requests and confirm user permissions.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.