Add Mattermost incoming webhooks integration#129
Merged
Conversation
Receive flag change notifications in Mattermost channels via Mattermost's incoming webhook feature. Uses the auditLogEventsHook capability with three templates (default, project, environment) targeting Mattermost's Slack-compatible attachment payload schema. All 2,387 tests in npm test pass, including JSON-validity checks across the project/environment/flag sample contexts. Co-authored-by: Cursor <cursoragent@cursor.com>
monsagri
approved these changes
May 20, 2026
Contributor
monsagri
left a comment
There was a problem hiding this comment.
LGTM!
I'll make sure we enable this once it's merged in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
There is no first-party Mattermost integration in the LaunchDarkly catalog today. Mattermost is the messaging platform of choice for many organizations that have policy or regulatory reasons not to standardize on Slack — particularly EU customers, defense / public-sector teams, and developers running self-hosted chat. The existing workaround is the
ld-webhook-transformerLabs project, which is useful as a Handlebars sandbox but adds operational overhead (Vercel + Neon Postgres + OAuth app) that customers don't want to take on per-team.A native, LD-hosted Mattermost integration is the natural next step.
What this PR adds
A new
integrations/mattermost/directory containing only static artifacts:manifest.json—auditLogEventsHookcapability, a singleuriform variable for the Mattermost incoming webhook URL, three templates (default / project / environment), and a sensibledefaultPolicyscoped to production-flag changes.templates/default.json.hbs— Mattermost-flavored Slack-compatible attachment for flag / member / segment / metric / webhook events.templates/project.json.hbs— project-scoped event (no environment field).templates/environment.json.hbs— environment-scoped event.assets/images/square.svg,assets/images/horizontal.svg— official Mattermost "instrument" mark and horizontal lockup, denim colorway, sourced from the Mattermost brand kit.README.md,LICENSE.md(Apache-2.0).Render output
Sample render of
templates/default.json.hbsagainstsample-context/flag/targeting-rule-update.json(vianpm run preview mattermost):```json
{
"username": "LaunchDarkly",
"attachments": [
{
"fallback": "Henrietta Powell updated the flag Demo flag in 'Production'",
"color": "#405BFF",
"title": "Demo flag",
"title_link": "https://app.launchdarkly.com/default/production/features/demo-flag",
"text": "Henrietta Powell updated the flag Demo flag in `Production`\n\n* Removed ...\n\nComment: Adjusting the targeting rules",
"fields": [
{ "title": "Project", "value": "The big project", "short": true },
{ "title": "Environment", "value": "Production", "short": true },
{ "title": "Action", "value": "updateRules", "short": true }
],
"footer": "LaunchDarkly",
"ts": 1779266887
}
]
}
```
Validation
Things to flag for the integrations team
I'll also send a heads-up to integrations@launchdarkly.com so the docs-page workflow can start in parallel.
Out of scope (potential follow-ups)
Made with Cursor