PostHog Feature Flag Impact Report: Conversion Delta per Variant to Microsoft Teams via n8n

Stop shipping feature flags into silence — get a weekly report showing exactly which flags moved your activation funnel and by how much.

The flow
PostHog logo
Source
PostHog
n8n logo
Process
n8n
Claude logo
Process
Claude
Microsoft Teams logo
Destination
Microsoft Teams

The stack in the order it runs — data flows from the source through to where it lands.

Why this stack

Feature flags without measurement are just feature toggles. Most early-stage teams ship a flag, watch qualitative feedback in Slack for a day, then forget to check whether it actually moved activation or conversion. This playbook automates a weekly rollup: query PostHog for each active flag's variant-level funnel conversion rates, compute the delta, and surface only the flags where the gap is worth acting on.

PostHog's Query API (`/api/projects/{id}/query`) accepts HogQL directly. That means one query per flag variant, conversion rates back as structured JSON, no intermediate warehouse. n8n is the right orchestrator because its Split in Batches node handles looping over N active flags cleanly, and the HTTP Request node works well with PostHog's Bearer token auth.

Microsoft Teams is specified here because this is an ops digest for a team, not a personal alert. Adaptive Card format lets you render a proper table — flag name, control rate, treatment rate, delta — which is Teams' equivalent of Slack's Block Kit for structured tabular data. If your team is on Slack, swap in a Slack node and the rest of the workflow stays identical.

Skip this if you have fewer than 500 unique users per flag variant per week. Below that, conversion rate deltas are noise, not signal. This is for teams with enough volume that a 3% activation delta is a real business decision — not statistical variance from 12 users.

The stack (4)

  1. PostHog logo

    Open-source product analytics + flags.

    One tool for events, session replay, and flags — fewer integrations to automate around.

  2. n8n logo

    Self-hostable workflow automation.

    Own your data and run unlimited steps without per-task pricing.

  3. Claude logo

    Long-context reasoning model from Anthropic — my daily driver for nuanced writing and orchestration.

    Better tone-matching and longer working memory than GPT for the tasks I care about most: guest messages, drafts, code review.

  4. Microsoft Teams logo

    Chat + channels for Microsoft-365 shops.

    If the company is on Outlook/365, Teams is where reports get read — push there, not a separate tool.

How it runs

  1. 1

    Set up n8n with a weekly Schedule trigger

    Create a new n8n workflow. Add a Schedule Trigger node set to fire every Monday at 9 AM in your team's local timezone. Name the workflow `PostHog Flag Impact Weekly`. Store your PostHog Personal API key and Project ID as n8n credentials — use the 'Header Auth' credential type, header name `Authorization`, value `Bearer YOUR_KEY`.

  2. 2

    Fetch all active feature flags from PostHog

    Add an HTTP Request node. Method: GET. URL: `https://app.posthog.com/api/projects/{PROJECT_ID}/feature_flags/?active=true`. Authenticate with your stored PostHog credential. The response is paginated — add a 'Loop Over Items' node to handle `next` cursor pagination. From each flag object, extract `key`, `id`, and `filters.multivariate.variants` (or `rollout_percentage` for boolean flags). Filter to flags created more than 7 days ago. You need at least a week of data before any delta means anything.

  3. 3

    Query funnel conversion per flag variant using HogQL

    Add an HTTP Request node inside the loop. POST to `https://app.posthog.com/api/projects/{PROJECT_ID}/query/` with body `{ "query": { "kind": "HogQLQuery", "query": "SELECT properties.$feature/{FLAG_KEY} AS variant, countIf(event = 'activation_complete') / count() AS conversion_rate, count() AS users FROM events WHERE timestamp >= now() - interval 7 day AND properties.$feature/{FLAG_KEY} IS NOT NULL GROUP BY variant" } }`. Replace `activation_complete` with whatever your actual activation event is named in PostHog. You get back one row per variant with its conversion rate.

  4. 4

    Compute delta and filter to actionable flags only

    Add a Code node (JavaScript). For each flag, pull the `control` variant row and each `test` variant row. Compute `delta = test_rate - control_rate` and `relative_lift = (delta / control_rate) * 100`. Drop any flag where `abs(delta) < 0.03` — less than 3 percentage points is not worth a digest entry. Also drop any flag where either variant has fewer than 500 users. Return an array of `{ flag_key, control_rate, test_rate, delta, relative_lift, control_users, test_users }`.

  5. 5

    Pass filtered flags to Claude for a one-line interpretation per flag

    Add an HTTP Request node pointed at `https://api.anthropic.com/v1/messages`. Send this prompt: 'Given these feature flag results, write a single plain-English sentence per flag explaining what the data suggests for a product team. Be specific about direction and magnitude. Do not hedge with statistical caveats — just say what the data shows. Flags: {JSON_ARRAY}'. Claude returns one short interpretive sentence per flag. That sentence is what makes the Teams message useful to non-technical stakeholders.

  6. 6

    Build and post an Adaptive Card to Microsoft Teams

    Add a Microsoft Teams node. Select 'Send Message' with Adaptive Card format. Card body: a header section reading 'Feature Flag Impact Report — Week of {date}', then one FactSet block per flag showing Flag Key, Control Rate (%), Test Rate (%), Delta, and Claude's interpretation sentence. Color-code the delta column — green if delta > 0.03, red if delta < -0.03. Post to your `#product-ops` Teams channel. If zero flags pass the filter threshold, post a single-line message: 'No flags with actionable deltas this week — all variants within ±3pp of control.'

  7. 7

    Log flag results to Airtable for trend tracking

    After the Teams post, add an Airtable node set to 'Create Record' in a table named `Flag Impact Log` with these fields: Week (date), Flag Key (text), Control Rate (number), Test Rate (number), Delta (number), Relative Lift (number), Control Users (number), Test Users (number). This is how you catch whether a flag's impact holds week-over-week or drifts toward zero — which is the signal to either ship it or kill it.

Want me to build this for you instead?

Product Audit and CTO Mode run out of this same thinking. If you’re reading this thinking “I want this, but in my product” — let’s talk.

See services

More like this