Automate Mattermost: Create Channel, Add Member, Post Message

Discover how to automate Mattermost tasks like creating channels, adding members, and posting welcome messages with this n8n workflow. Save time and reduce manual errors by streamlining your team onboarding process.
manualTrigger
mattermost
Workflow Identifier: 2417
NODES in Use: Manual Trigger, Mattermost

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

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

Opening Problem Statement

Meet Lisa, a community manager at a growing tech startup. Every time a new project kicks off, she manually creates a Mattermost channel, adds the relevant team members, and posts a welcome message to get everyone aligned. This repetitive task takes up about 30 minutes per project and is prone to human error—sometimes a member gets missed or the channel name is mistyped. Over weeks, this adds up to hours of wasted time and inconsistent communication settings.

This is exactly where our specialized n8n workflow shines. It automates Lisa’s process, ensuring channels are created consistently, members added correctly, and welcome messages posted without lifting a finger.

What This Automation Does

When this workflow runs, it automates the following core actions within Mattermost:

  • Creates a new channel with a specified team and name.
  • Adds a specific user to that newly created channel to ensure immediate team inclusion.
  • Posts a personalized welcome message directly into the channel to onboard members actively.
  • Chains the above steps seamlessly so no manual interaction is needed after triggering.
  • Reduces manual errors by using actual channel IDs and user IDs fetched dynamically.
  • Speeds up team collaboration setup, cutting down tens of minutes per new project channel creation.

Prerequisites ⚙️

  • n8n account: An active n8n instance or cloud account to build and run workflows.
  • Mattermost account: Access to a Mattermost workspace with appropriate permissions to create channels and manage users.
  • Mattermost API credentials 🔐: API token with channel and user management permissions for n8n integration.

Step-by-Step Guide

1. Triggering the Workflow Manually

Navigate to your n8n dashboard. Click “New Workflow” and add the Manual Trigger node named On clicking ‘execute’. This node allows you to start the workflow manually for testing and demonstration purposes.

Visual cue: The node appears as a button in the workflow editor. Clicking it will run the workflow sequence.

Common mistake: Forgetting to activate the workflow before execution. Ensure you activate the workflow or use manual trigger properly.

2. Creating a Mattermost Channel (Mattermost node)

Add the Mattermost node and configure as follows:

  • Resource: Channel
  • Team ID: “4zhpirmh97fn7jgp7qhyue5a6e” (replace with your workspace’s actual team ID)
  • Channel Name: “docs” (or any desired channel name)
  • Display Name: “Docs” (user-friendly channel display)
  • Credentials: Link your Mattermost API credentials.

Tip: The output of this node includes the channel’s unique ID, needed for subsequent steps.

Expected result: The channel named “docs” is created in your specified team.

3. Adding a User to the Channel (Mattermost1 node)

Add another Mattermost node named Mattermost1 to add a member to the newly created channel.

  • Resource: Channel
  • Operation: Add User
  • Channel ID: Use expression {{$node["Mattermost"].json["id"]}} – this dynamically references the channel created in the previous step.
  • User ID: “5oiy71hukjgd9eprj1o4a3poio” (replace with the actual user you want to add to the channel)
  • Credentials: Use the same Mattermost API credentials.

Expected outcome: This user is added to the “docs” channel immediately.

Common pitfall: Using a static channel ID instead of the expression will likely cause the workflow to add the user to a wrong or non-existent channel.

4. Posting a Welcome Message (Mattermost2 node)

Add a final Mattermost node named Mattermost2 to post a message in the channel.

  • Channel ID: Again, use {{$node["Mattermost"].json["id"]}} to dynamically select the created channel.
  • Message: “Hey! Welcome to the channel!” (You can customize this greeting.)
  • Attachments: Leave empty or configure as desired for richer messages.
  • Credentials: Mattermost API credentials.

Result: A friendly welcome message appears in the channel right after user addition.

Customizations ✏️

  • Change channel names dynamically: Instead of “docs,” use a parameter input or set by a previous trigger node to create different channels per workflow run.
  • Add multiple users: Duplicate the Mattermost1 node for each user or use a loop to add multiple users to the channel automatically.
  • Personalize welcome messages: Modify the Mattermost2 node’s message field to include dynamic data, like mentioning team members with @username or including project details.
  • Schedule the workflow: Replace the manual trigger with a time trigger to create and onboard users regularly at specific intervals.
  • Use attachments: Enhance welcome messages with JSON attachments for images, links, or buttons using the attachments field in the Mattermost2 node.

Troubleshooting 🔧

Problem: “User ID or Channel ID invalid” error

Cause: Incorrect IDs or static values instead of dynamic expressions.

Solution: Double-check the user and channel IDs in your Mattermost workspace, and use expressions like {{$node["Mattermost"].json["id"]}} for channel ID references.

Problem: “Permission denied” when creating channels or adding users

Cause: API credentials lack sufficient permissions.

Solution: Verify your Mattermost API token scopes and update permissions accordingly in the Mattermost admin settings.

Pre-Production Checklist ✅

  • Verify your Mattermost API credentials work and have channel/user management rights.
  • Test each node independently in n8n using the manual trigger to ensure expected outputs.
  • Confirm team ID, user ID, and channel names are accurate for your Mattermost instance.
  • Ensure all expressions reference correct node outputs.
  • Backup your workflow before making major modifications.

Deployment Guide

After verifying and testing the workflow, activate it in n8n by toggling the “Active” switch on the workflow editor. You can run it manually via the trigger or connect to other triggers for automation.

Monitor execution in the n8n history dashboard to check for errors or data mismatches.

Conclusion

You’ve now built a reliable Mattermost automation that creates project channels, adds members, and sends welcome messages — all in seconds. This saves you and your team valuable time and ensures consistent onboarding for every new channel.

Imagine cutting down onboarding from 30 minutes to near-instant execution. Next, consider automating user removals, customizing notifications, or integrating with project management tools for seamless workflows.

Automation like this empowers teams and reduces repetitive busy work. Keep exploring n8n’s Mattermost nodes to tailor more automations for your workspace!

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free