# Log every production feature flag change to Sheets and Slack

> Every production flag change lands in a compliance spreadsheet and your release channel, so auditors and engineers both see who changed what.

- Workflow type: code
- Services: LaunchDarkly, Google Sheets, Slack
- Categories: Engineering, Operations
- Published: 2026-08-07

## What it does

- Watches your production LaunchDarkly environments and reacts the moment someone changes a feature flag.
- Pulls the full detail of that change, including what the flag looked like before and after.
- Appends a timestamped row to a Google Sheets compliance log with the project, environment, flag, the person who made the change, the kind of change, and a link back to the original record.
- Posts a short update to your release channel in Slack showing who changed which flag and its before and after state, while staging and development churn stays out of both places.

## What you'll need

- A LaunchDarkly account with access to the projects and production environments you want tracked
- Permission in LaunchDarkly to set up change notifications for your account
- A Google account and a spreadsheet to use as the compliance log
- A Slack workspace and the channel where release updates should be posted

## Prompt

Trigger this workflow from a LaunchDarkly change history webhook so it runs every time someone makes a change in LaunchDarkly. Build it as deterministic code: parse the incoming event, look up the full detail of the change, write one row to a spreadsheet, and post one Slack message. No summarization or judgement is needed at any step.

First, read the incoming event to get the audit log entry id along with the project key and environment key the change belongs to. Only continue when the environment is one of my production environments. Treat the list of production environment keys as a setting I can edit, defaulting to an environment key of "production". If the change came from staging, development, QA or any other non production environment, stop immediately so that routine churn never reaches the compliance sheet or the Slack channel.

For changes that pass the production filter, call the LaunchDarkly "Get audit log entry" operation with the entry id from the event. That returns the full detail of the change, including the member who made it, the kind of change, the resource that was touched, and the previous version, current version and delta representations. Use the delta together with the two version representations to derive the before and after state of the flag, for example whether targeting was switched on or off in that environment, or which targeting rule or default variation changed.

Append one row to my compliance spreadsheet with the Google Sheets "Append Values" operation. The row should capture the timestamp of the change, the project, the environment, the flag key, the name and email of the member who made the change, the kind of change, a short before and after description derived from the delta, and a link back to the entry in LaunchDarkly so an auditor can open the original record. Let me configure the spreadsheet and the tab name. Always append after the last row so the log grows as a durable, append only record and nothing already written is overwritten.

Then post to my release channel using the Slack "Send a Message" operation. The message should say who changed which flag, in which project and environment, what kind of change it was, and the before and after state on their own lines, with a link to the entry in LaunchDarkly. Keep it short enough to scan in a busy channel. Let me configure the channel, and let me choose which kinds of change are worth posting versus only being logged to the sheet. By default, post every change that passes the production filter.

If the detail lookup fails or the entry cannot be found, still append a row using whatever the incoming event itself contained and note in that row that the detail lookup failed, so the compliance log never has a silent gap.

## How to customize

- Choose which environments count as production, so staging, development and QA activity never reaches the sheet or the channel.
- Point the log at any spreadsheet and tab, and add or reorder the columns your auditors care about.
- Decide which kinds of change deserve a Slack post versus being quietly logged, for example only flag on and off flips and targeting changes.

## FAQ

### Does this replace the change history already inside LaunchDarkly?

No, it mirrors it. LaunchDarkly keeps its own record, and this workflow copies the production entries into a spreadsheet you control so the history lives somewhere auditors can filter, sort and keep alongside the rest of your evidence.

### Can people without a LaunchDarkly seat read the log?

Yes, and that is the main point. Compliance leads, auditors and managers just need access to the Google Sheet. They never need a LaunchDarkly login to see who changed which flag and when.

### Will changes in staging or development show up?

No. The workflow only reacts to the environments you mark as production, so day to day experimentation in lower environments stays out of both the spreadsheet and the Slack channel.

### What if several flags change at the same time?

Each change is handled on its own. Every change gets its own row in the spreadsheet and its own Slack message, so nothing gets merged or lost when a release touches many flags at once.

### Does the log show what the flag was before it changed?

Yes. The workflow pulls the detailed record of the change, which includes the flag state before and after, so the row and the Slack message both show the actual before and after rather than just saying something was edited.

Use this prompt in General Input: https://www.generalinput.com/prompts/log-every-production-feature-flag-change-to-sheets-and-slack