Prerequisites
To use this integration, you must have:- A Mattermost workspace with permission to create incoming webhooks
- A LaunchDarkly account with permission to create integrations
Set up an incoming webhook in Mattermost
To add LaunchDarkly to a Mattermost workspace, you first configure an incoming webhook in Mattermost, then add the webhook URL to LaunchDarkly. Follow these steps:- Sign in to your Mattermost workspace.
- From the main menu, navigate to Integrations > Incoming Webhooks.
- Click Add Incoming Webhook.
- Fill in the display name (for example, “LaunchDarkly”), an optional description, and select the channel you want notifications delivered to.
- Click Save.
- Copy the provided webhook URL to your clipboard. You will need it in the next procedure.
Connect LaunchDarkly to Mattermost
To configure LaunchDarkly to connect with the Mattermost webhook:- In LaunchDarkly, click the gear icon in the left sidebar to view Organization settings.
- Click Integrations and find “Mattermost incoming webhooks.”
- Click Add integration. The “Create Mattermost incoming webhooks configuration” panel appears.
- Paste your Incoming webhook URL into the field.
- Set any filters for sending notifications to Mattermost by configuring a policy. LaunchDarkly sends all flag change events in the production environment to Mattermost by default. To learn more about creating a policy filter, read Add a policy filter.
- Click Save configuration.
Add a policy filter
LaunchDarkly sends all flag change events in the production environment to a webhook by default. To customize the events LaunchDarkly sends to your Mattermost channel, use the policy editor in the webhook creation panel. For example, if you want to receive an event only when a change is made to one of your production feature flags, you can add the following policy to the webhook integration:Disable a Mattermost incoming webhook
To temporarily disable a Mattermost incoming webhook:- In LaunchDarkly, navigate to the Integrations page and find “Mattermost incoming webhooks.”
- Click the expand arrow to display all of the configured webhooks.
- Click the pencil icon next to the webhook you want to disable. The “Edit Mattermost incoming webhooks configuration” panel appears.
- Toggle the switch Off.