automation

Supercharging Mattermost with no-code automation

In the world of collaboration, Mattermost empowers teams to connect and collaborate over their mission-critical objectives. 

But what if we could extend Mattermost’s capabilities far beyond its core features? What if we could seamlessly integrate with a multitude of other tools and services, automating workflows and unlocking a world of infinite possibilities?

No-code automation tools like Zapier, Make (formerly Integromat), or n8n are nothing new. Your organization probably already has some simple “zaps” in Zapier or workflows in n8n. These automation tools can be leveraged to transform Mattermost into an integration powerhouse. 

In this blog post, we’ll ditch the confines of code-heavy plugins and explore the nearly infinite potential of no-code automation to elevate Mattermost’s functionality to new heights. Keep reading to learn how to streamline your team’s workflows and empower individuals to automate all the things — without the need for a software engineer to bring your vision to life.

Beyond boundaries: A world of integrations

No-code automation platforms open the doors to an expansive collection of integrations, allowing you to connect Mattermost with your CRM, project management tools, cloud storage platforms, social media channels, or even other internal services at your organization. The possibilities are truly limitless.

Navigating the no-code landscape: Major players

Before we dive deeper, let’s take a moment to explore the major players in the no-code automation space, each with its own strengths and focus:

  • Zapier is a popular cloud-based platform known for its vast library of pre-built integrations and user-friendly interface. Zapier has predefined triggers and actions for over 7,000 different applications, meaning it’s a great choice for quick and easy connections between all the popular apps. Zapier is the one on the list you’re most likely to have used or heard of previously — it’s like the “kleenex” of workflow automation.
  • Make (formerly Integromat) offers a more visual and flexible approach to automation, allowing you to build complex workflows with advanced logic and data manipulation. Although not as expansive as Zapier, Make has an expansive library of nearly 2,000 supported applications (some with more depth than Zapier, some with less), meaning you’d be hard-pressed to find an application you can’t integrate with. 
  • n8n is an open-source, self-hostable platform (sound familiar?) that provides unparalleled control and customization. It’s ideal for organizations prioritizing data residency and security, and can be supported in air-gapped environments. n8n shares a lot of the security advantages of Mattermost itself. n8n’s pre-built library of connections sits around half that of Make with a count of 1,000. However, the open nature of n8n means there’s a large community of people sharing their custom workflows and automations that can either be used directly or iterated on for your own purposes. 

Zapier and Make both offer free tiers in their cloud-hosted services. For n8n, you’ll have to self-host it to use it for free (their Cloud offering does have a free trial). Each offers varying levels of support for different enterprise features (like SSO, audit logging, etc.) on their pricing pages, so check them out!

There’s no wrong choice

The beauty of the no-code automation landscape is that there’s no one-size-fits-all solution. The best platform for your team depends on your specific needs, preferences, and technical capabilities. 

If you value ease of use and a vast library of integrations, Zapier might be the perfect fit. If you crave flexibility and visual workflow design, check out Make. If openness, security, data residency, and self-hosting are paramount, n8n shines brightest. 

It’s important to remember not to reinvent the wheel here; if your organization is already leveraging one of these workflow automation tools, I’d recommend sticking with that one.

n8n: The self-hosted powerhouse

While Zapier and Make offer convenient cloud-based automation, n8n stands out as it matches our self-hosting capability at Mattermost, along with a base service that is free and open source. This makes it an ideal choice for organizations looking at Mattermost — those that prioritize data security and control and need an out-of-band communications platform — especially those in air-gapped environments where cloud solutions like the alternatives might not be feasible.

Automating the mundane to amplify the extraordinary

No-code automation empowers you to automate repetitive tasks, freeing your team to focus on innovation, collaboration, and strategic goals. 

Let’s explore a few examples of how Zapier, Make, and n8n could revolutionize your Mattermost experience:

  • Centralized notifications: Consolidate notifications from various sources (email, social media, project management tools, etc.) directly into Mattermost channels, ensuring your team stays informed without toggling between multiple applications.
  • Customer support management: Opened tickets in Zendesk can be sent to channels in Mattermost, where your team can respond to your customers directly discussing and triaging the issue collaboratively.
  • Social media engagement: Monitor social media mentions, automatically posting updates to Mattermost channels, and engage with your audience directly from within Mattermost, fostering community and brand awareness.
  • CRM integrations: Synchronize customer data between Mattermost and CRM systems like Salesforce or ServiceNow, empowering your team with real-time insights and enabling personalized communication.
  • Custom workflows: Connect Mattermost to internal services or platforms your organization has built out for day-to-day operations. Allow your IT team to provision users for your internal staging environments from inside Mattermost. Let your daily automated test runs send updates to Mattermost through automated workflows. Tailor workflows to your unique needs, automating complex processes, triggering actions based on specific events, and creating a truly custom Mattermost experience.

Integrating Mattermost and PagerDuty with n8n

To give you a better idea of what this looks like, let’s examine a practical, in-depth example of how n8n can be used to integrate Mattermost with PagerDuty, enhancing incident management and response. 

For this example, we’ll be leveraging the power of n8n. I want to once again stress that n8n is simply the tool I’ve chosen to use here — everything you’re about to see could also be accomplished by Zapier or Make should those tools better fit your organization’s needs.

  1. Setting the stage: n8n workflows
    • In n8n, create two workflows:
      1. PagerDuty webhook listener: This workflow will listen for webhooks from PagerDuty, specifically for incidents being triggered, acknowledged, or resolved. 
      2. Mattermost webhook listener: This workflow will handle button clicks and interactive dialog responses from Mattermost
A screenshot of the n8n PagerDuty Webhook listener workflow.
A screenshot of the n8n Mattermost webhook action handler workflow.

2. Incident creation in Mattermost

  • Trigger: When a new incident is triggered in PagerDuty, it sends a webhook to n8n.
  • Action in n8n (PagerDuty webhook listener):
    • n8n receives the webhook, and extracts the type; PagerDuty emits webhooks for incident creation, acknowledgement, resolving, and much more. For now, we’ll pass it through a “switch” which allows us to change our action based on the type of event.
    • Once we know the event type, we can act accordingly, passing the event’s data to the Mattermost node, which creates a new post in a designated Mattermost channel.
    • When an incident is triggered we’ll create a post in the “Cloud Production Alerts” channel, with three interactive buttons: ACK, RESOLVE, and UPDATE STATUS, using Mattermost’s built-in support for interactive messages.

3. Empowering incident management from Mattermost

  • Trigger: A user in Mattermost clicks one of the buttons (ACK, RESOLVE, UPDATE STATUS) on the incident post
  • Action in n8n (Mattermost webhook listener):
    • ACK/RESOLVE:
      • n8n receives the button click webhook, identifies the corresponding PagerDuty incident, and uses the PagerDuty node to acknowledge or resolve the incident.
      • n8n can then update the original Mattermost post to reflect the status, or in the case of our workflow, attach thumbs-up emoji when an incident has been acknowledged.
  • UPDATE STATUS:
    • n8n triggers an interactive dialog to be displayed to the user who clicked on the button, presenting a modal with a text area for the user to input a status update.
    • When the user submits the update, n8n receives the payload, extracts the status update text, and uses the PagerDuty node to update the incident’s status. 
    • Again, n8n can optionally update the original Mattermost post with any extra details. Here, we opt to send a discrete message about the update, as that allows those watching to see a chronological timeline of the incident within Mattermost.

Conclusion: Unleashing the power of Mattermost

The fusion of Mattermost and no-code automation platforms like n8n, Zapier, and Make enables you to transcend the limitations of traditional collaboration. 

By embracing automation, you can unlock a world of possibilities, streamline workflows, and elevate your team’s productivity — all from a secure, out-of-band solution for mission-critical communication. 

Remember, n8n’s self-hosting capability makes it a compelling choice for security-conscious organizations and those operating in air-gapped environments. But Zapier and Make provide their own advantages, and the three tools are nearly drop-in replacements for each other. 

I hope this example has sparked some interest in letting your imagination soar and look forward to seeing how you transform your Mattermost experience with your own automations.

If you have any questions or want to show off an automation you’ve built, visit our community forums and show off what you’ve built! We’d love to hear from you.

Nick Misasi is a senior software design engineer at Mattermost.