No results for ""
EXPAND ALL
  • Home
  • API docs

GIVE DOCS FEEDBACK

Slack Incoming Webhooks

Read time: 2 minutes
Last edited: May 03, 2024

Overview

This topic explains how to use the Slack webhook integration to set up Slack Incoming Webhooks to receive any activities in LaunchDarkly. When you change something in LaunchDarkly, for example, when you update a feature flag, update a segment, or invite a new account member, LaunchDarkly sends 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.

Create a Slack incoming hook

First, create an incoming hook in Slack. To do this:

  1. Navigate to the Incoming Webhooks page in Slack.
  2. Select a channel.
  3. Click Add Incoming WebHooks integration:
The Incoming Webhooks page.
The Incoming Webhooks page.
  1. Copy and save the Webhook URL.

Then, set up the integration in LaunchDarkly. To do this:

  1. In LaunchDarkly, navigate to the Integrations page and find the "Slack incoming webhooks" integration.
  2. Click Add integration.
  3. Enter a Name for the webhook.
  4. In the URL field, enter the webhook URL you saved from step 4 in the previous procedure.
  5. (Optional) Click + Add statement to add a policy filter, or click Advanced editor.
  6. Click Save incoming webhook.

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 Slack room, use the policy editor in the webhook creation panel. To learn more about creating a policy, read Example policies and templates.

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:

[
{
"effect": "allow",
"actions": ["*"],
"resources": ["proj/*:env/production:flag/*"]
}
]

Disable a Slack incoming webhook

To temporarily disable a Slack incoming webhook:

  1. Navigate to the Integrations page and find "Slack incoming webhooks."
  2. Click the expand arrow to display all of the configured webhooks.
The expand arrow for an integration.
The expand arrow for an integration.
  1. Click the edit icon next to the webhook you want to disable. The "Edit Slack incoming webhook" panel appears.
  2. Toggle the switch Off.