Log every production feature flag change to Sheets and Slack

By General Input

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

Integrations

  • LaunchDarkly
  • Google Sheets
  • Slack

Type

Deterministic Code

Categories

  • Engineering
  • Operations

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.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageWin back LiveChat visitors whose chats went unansweredLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardChat quality review board for LiveChat support leadsLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seats