The Scenario
It's the third time this week someone has asked you to update the PostHog experiment cohort. The growth team ran a SQL query, exported 150 PostHog user UUIDs to a Google Sheet, and now they need every one of those users added to the static cohort called "High LTV Users Q2" before the experiment goes live Friday. The last two times this came up you manually navigated PostHog's cohort UI and entered users one at a time. There were 30 users then. Now there are 150.
The bad version:
- Open PostHog, navigate to the cohort, click "Add person," paste a UUID, click confirm, repeat 150 times across two browser tabs
- Lose your place at row 87 when a Slack notification pulls your attention away, restart from your best guess at where you left off
- Finish the manual adds, discover the experiment won't launch because three UUIDs had a trailing newline character from the SQL export and PostHog rejected them silently
There are 150 rows and a Friday deadline. Manually clicking through a cohort UI is not how this gets done.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Google Sheet. It reads your list of UUIDs, calls the PostHog bulk-add cohort endpoint, and writes back confirmation for each record — without any clicking in the PostHog UI.
Read all user UUIDs from column A of this sheet and bulk-add them to the PostHog static cohort named 'High LTV Users Q2'. Write the result status for each UUID into column B.
What You Get
- All 150 UUIDs are submitted to the PostHog bulk-add endpoint in a single call
- Column B receives a status for each row: "Added" or the specific error reason from PostHog
- Any UUID that fails (whitespace, invalid format, not found) is identified so you can fix and re-run only those rows
What If the Data Is Not Quite Ready
UUIDs have trailing whitespace from the SQL export
Trim all whitespace from column A before sending, then bulk-add the cleaned UUIDs to PostHog static cohort ID cohort_123. Write "Added" or the error into column B.
You only want to add users who meet a filter in the sheet
Add only the UUIDs from column A where column C says "Enterprise" to the PostHog static cohort named 'High LTV Users Q2'. Skip any row where column C is blank. Write status into column D.
UUIDs are split across two tabs
Combine all UUIDs from the "Q1 Export" tab column A and the "Q2 Export" tab column A, deduplicate them, then bulk-add the unique list to PostHog static cohort ID cohort_456. Write a summary count of added vs. skipped.
Clean, dedup, filter, and add in one pass
In the "Cohort Candidates" sheet: trim column A, remove any rows where column B plan type is "Free", deduplicate column A UUIDs, and bulk-add the remaining UUIDs to the PostHog static cohort named 'High LTV Users Q2'. Write status into column C and a final count at the bottom.
The approach is consistent: describe the data condition and the destination in one prompt, and SheetXAI handles both the cleanup and the API call.
Try It
Get the 7-day free trial of SheetXAI and open any Google Sheet with a list of PostHog user IDs — from a SQL export, a CRM filter, or a manual curation — and ask it to bulk-add them to a cohort. Also see: Export All PostHog Feature Flags Into a Google Sheet for Audit and the PostHog hub.
