Back to PostHog in Excel
SheetXAI logo
PostHog logo
PostHog · Excel Guide

Bulk Create PostHog Feature Flags From an Excel workbook Definition

2026-05-15
5 min read

The Scenario

A DevOps engineer is three days into a production PostHog setup. The staging project was just created — empty. A definition Excel workbook has 25 feature flags: key, name, rollout percentage, filter group JSON, and active status, all reviewed and approved. The task is to get all 25 into the new project before Thursday's go-live. The previous path was clicking through PostHog's create flag form one at a time. The last time someone did this for 20 flags, two filter group entries had typos that broke rollout targeting in production for 36 hours before anyone noticed.

The bad version:

  • Open PostHog's "Create feature flag" form, paste flag key from row 1, enter name, set rollout, expand filter group, manually re-enter the JSON conditions, save — repeat 24 more times
  • Hit flag 9 and realize the UI field order doesn't map to the workbook column order, so you've been copying field values into the wrong inputs for the last three flags
  • Finish all 25, test one in staging, discover flag 17 has a filter property name typo that the UI accepted without warning

Twenty-five flags with filter conditions entered by hand is a deployment risk.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Excel workbook. It reads the flag definition table and calls PostHog's create endpoint for each row — writing returned flag IDs back into column E.

Read the 'Feature Flags' tab of this Excel workbook and create a PostHog feature flag for each row using key column A, description column B, rollout column C, active status column D. Write flag IDs into column E.

What You Get

  • PostHog creates each flag using the exact key, name, rollout, and active status from the workbook
  • Column E receives the returned flag ID for each row — a record linking each definition to its live PostHog flag
  • Rows that fail (duplicate key, invalid rollout) get an error note in column E

What If the Data Is Not Quite Ready

Rollout column has inconsistent formatting

Before creating flags, normalize column C: convert decimal rollout values below 1 to whole number percentages (0.5 becomes 50). Then create a PostHog feature flag for each row and write flag IDs into column E.

You want to skip flags that already exist

Before creating each flag, check if a PostHog feature flag with the same key already exists. Write "Already exists" in column E for matching rows and skip them. For new keys, create the flag and write the returned ID.

Active status column has inconsistent values

Before creating flags, normalize column D: map 'Yes', 'TRUE', '1' to true and 'No', 'FALSE', '0' to false. Then create PostHog feature flags using key column A, name column B, rollout column C, normalized active status from column D. Write IDs into column E.

Full validation and bulk creation in one pass

In the 'Flag Definitions' worksheet: skip rows where column A (key) is blank or contains spaces. Normalize column C rollout values from decimal to whole number. Create a PostHog feature flag for each remaining row. Write the returned flag ID into column E and "Error: [reason]" for any failures. Write a count of created vs. failed at the bottom.

Validation and bulk creation — no pre-cleaning pass required.

Try It

Get the 7-day free trial of SheetXAI and open your flag definition workbook, ask it to create all 25 flags in PostHog, and have the project seeded before Thursday's go-live. Also see: Export All PostHog Feature Flags Into an Excel workbook for Audit and the PostHog hub.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more