Mattermost
Learn about how to use Mattermost provider for chat notifications
When using Mattermost, you will have to store the integration credentials within the subscriber entity. Mattermost supports two ways to do this:
- Using the Mattermost Webhook integration.
- Using the Mattermost Bot integration.
Mattermost Webhook Integration
To integrate Mattermost with your application using the Mattermost Webhook integration, follow these steps:
- Create an incoming webhook in Mattermost. This can be done by going to the Integrations page and clicking on the Incoming Webhooks tab.
- Click on the Add Incoming Webhook button and configure the webhook settings. Be sure to select the channel where you want to receive notifications.
- Click on the Save button to generate a webhook URL.
Once you have the webhook URL, you can store it in the subscriber entity in your application. This will allow you to send notifications to Mattermost using the following code:
Mattermost Bot Integration
To integrate Mattermost with your application using the Mattermost Bot integration, you will need to create a Mattermost bot account and generate an API token for the bot. Once you have the API token, you can store it in the subscriber entity in your application.
Once you have stored the API token in the subscriber entity, you can send notifications to Mattermost using the following code:
Was this page helpful?