• Home
  • Integrations
  • SDKs
  • Guides
  • API docs
No results for ""
EXPAND ALL

EDIT ON GITHUB

Subscribing to notifications

Read time: 3 minutes
Last edited: Jan 24, 2022

Overview

This topic explains how to subscribe to flag notifications in Slack channels. You can receive notifications for when flags are created, updated, deleted, or ready for removal.

It can be useful to let an entire channel know when a flag changes or is ready to remove. You can subscribe Slack channels to notifications from individual flags or the entire set of flags associated with a filter as described in the previous topic.

For more information about filter-based notifications, read Viewing, monitoring, and subscribing to notifications.

Receiving update notifications in channels

When someone updates a flag, either directly in LaunchDarkly or through the Slack app, a notification of the change is sent to any channel subscribed to updates for that flag.

The notification includes the following information:

  • The name of the person who made the change
  • The name of the flag
  • The environment, project, and key of the flag
  • A comment about the change, if applicable

Click View Flag to visit the Flag Overview screen.

You can subscribe to updates from specific flags so you receive notifications when the flag changes.

When you view filter results in a channel, you can subscribe to updates from any flag in that set of results. When the flag is changed, either through the LaunchDarkly UI or the Slack app, a notification appears in any channel subscribed to that flag.

To learn more about filtering flags, read Viewing, monitoring, and subscribing to flags.

You must invite the LaunchDarkly Slack app to private Slack channels

If you want to subscribe to notifications in private channels, you must invite the LaunchDarkly bot (@LaunchDarkly) to the channel. If the LaunchDarkly Slack bot is not in a channel, it cannot send notifications to that channel.

You do not need to manually invite the LaunchDarkly bot user to public channels.

To add a flag filter to a channel:

  1. Open the Slack channel where you wish notifications about a flag to appear.
  2. Type /launchdarkly subscribe in your Slack client's text bar and press Enter. The filter modal appears.
  3. Filter on the project, environment, flag key, status, action, or flag tags to narrow the scope of changes.
  4. Click Add to Channel in the dropdown menu next to the flag you wish to subscribe to.
  5. The channel receives a notification that the flag has been added to that channel.
A notification that a flag has been added to channel.
A notification that a flag has been added to channel.
A notification that a flag subscribed to the channel has had a status change.
A notification that a flag subscribed to the channel has had a status change.

Receiving alerts when flags are ready to remove

In the Slack app, you can subscribe to notifications when it’s time to remove flags from code. Removing from code is a necessary step before archiving flags.

Read about deleting and archiving flags to learn how to keep your codebase clean. The Slack app makes it easy to receive notifications once flags are ready to remove.

You will get served a “ready to remove” notification when any flags that you subscribe to become “inactive” or “launched” in status code.

To set up a ready to remove flag alert:

  1. Open the channel where you want to get notifications on flags that are ready to remove.
  2. Type /launchdarkly subscribe and press Enter. The filter modal appears.
  3. Filter on the project, environment, flag key, or flag tags where you want to be notified when flags have become "inactive" or "launched".
  4. Select "Ready for removal" from the Actions dropdown, which lets you only be notified on flags that are ready to remove and archive.
  5. Click Filter.
  6. Click Add flag to channel in the dropdown menu next to the flag you wish to subscribe to, or, click Add filter to channel if you want all of the results to show notifications.
  7. You'll see a notification that your subscription has been added to the channel.

Removing flag notifications from a channel

You are able to remove flags from a channel so that you no longer receive notifications when the flag changes.

  1. Open the Slack channel where you would like to remove notifications.
  2. Type /launchdarkly flags and press Enter. A list of flags associated with the channel appears.
  3. Locate the flag you wish to remove from the channel.
  4. Select Remove flag from channel in the dropdown menu beside the name of the flag.
  5. Once the subscription is removed, the entire channel receives a notification of the change.
The output of the `/launchdarkly flags` command with the "Remove flag from channel" menu item highlighted.
The output of the `/launchdarkly flags` command with the "Remove flag from channel" menu item highlighted.

Removing flag filter notifications from a channel

  1. Open the Slack channel where you would like to remove notifications.
  2. Type /launchdarkly filters and press Enter. A list of flag filters associated with the channel appears.
  3. Locate the filter you wish to remove from the channel.
  4. Select Remove to remove notifications matching the filter from the Slack channel.
The output of the `/launchdarkly filters` command.
The output of the `/launchdarkly filters` command.

Receiving approval request notifications

Approvals is a Pro and Enterprise feature

Approvals is available to customers on a Pro or Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.

If your company uses feature workflows and the Slack app, you receive a direct message in Slack when someone requests an approval from you, or when an approval request you made is approved, denied, or receives a comment.

You cannot interact with an approval from these notifications. They are indicators that you should log into LaunchDarkly and review your approval requests.

To learn more about approval requests, read Approvals.