• HOME
  • INTEGRATIONS
  • SDK
  • API DOCS
No results for ""
EXPAND ALL
CLOSE
launchdarkly.com

EDIT ON GITHUB

Webhook integration

Read time: 1 minute
Last edited: Feb 12, 2020

Overview

This topic explains how to use the Slack webhook integration to set up Slack Incoming Webhooks to receive any activities in LaunchDarkly. When something is changed (e.g. when a feature flag is updated, when a new team member is invited to LaunchDarkly, and more) we'll send an incoming webhook to Slack.

New Slack app is now available

LaunchDarkly has developed a new Slack app which is more powerful and easier to use than the Slack webhooks integration.

The content below describes the older webhook-based integration.

Creating a Slack incoming hook

First, create an incoming hook in Slack. To do this, head to the Incoming Webhooks page in Slack, select a channel, and click Add Incoming WebHooks integration.

The Incoming Webhooks page.
The Incoming Webhooks page.

Copy the Webhook URL, and in LaunchDarkly, navigate to the Integrations page, and click Add Integration in the chat integrations section.

Adding a policy filter

By default, room notifications set up without a policy filter will receive a notification for any change in LaunchDarkly (across any project, environment, goal, feature flag, etc.). You can optionally specify a policy (using the same syntax as our custom roles feature to filter the events sent to your room.

For example, if you only want to receive an event when a change is made to one of your production feature flags, you can add the following policy to your room notification:

1[{
2 "effect": "allow",
3 "resources": [
4 "proj/*:env/production:flag/*"
5 ],
6 "actions": [
7 "*"
8 ]
9}]

The configuration screen with a policy written.
The configuration screen with a policy written.

Disabling a Slack incoming webhook

You can temporarily disable a Slack incoming webhook by hitting the On/Off switch on the Integrations page.

The Slack webhook with the toggle called out.
The Slack webhook with the toggle called out.