The Scenario
A data engineering team is running a warehouse setup sprint. Three PostHog batch exports need to be configured — S3, BigQuery, Redshift — each with a different destination config, all before Friday. The configuration for each is already in an Excel workbook: destination type, settings JSON, interval. The last time this team set up batch exports through the PostHog UI for two destinations, a config typo caused 48 hours of silent data pipeline failure before anyone noticed during a dashboard audit.
The bad version:
- Navigate to PostHog batch exports, click "New export," select S3, manually enter bucket, region, prefix, and compression from the workbook — save
- Repeat for BigQuery: the UI field order doesn't match the workbook column order, so you cross-reference as you go — one wrong paste and the project ID lands in the dataset field
- Repeat for Redshift: finish, test, discover the port number for Redshift came from the BigQuery row because the two rows look similar and you were working fast
Three exports, manual field-by-field entry, one typo away from two days of dark pipelines.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Excel workbook. It reads the export config table and calls PostHog's batch export create endpoint for each row — writing returned UUIDs into column D for monitoring and backfill reference.
Create a PostHog batch export for each row in the 'Export Config' worksheet — destination type in column A, destination settings JSON in column B, interval in column C — and write returned export UUID into column D.
What You Get
- PostHog creates one batch export per row using the exact config from the workbook
- Column D receives the export UUID for each row — your reference for monitoring and backfill requests
- Any row that fails gets an error note in column D instead of a UUID
What If the Data Is Not Quite Ready
Settings column is not valid JSON
Before creating exports, validate each value in column B is valid JSON. Write "Invalid JSON" in column D for rows that fail, and skip them. For valid rows, create the PostHog batch export and write the returned UUID into column D.
You want to retrieve backfill history after creation
For the batch export with UUID in cell A1, retrieve all backfill runs and write start time, end time, and status for each run into the 'Backfill History' worksheet starting at row 2.
Trigger a backfill immediately after creating an export
Create the PostHog batch export from row 2 of the 'Export Config' worksheet. Write the returned UUID into column D. Then trigger a backfill for that export covering the date range in cells F2 (start) and G2 (end).
Create all exports, validate, and flag inactive ones
Create PostHog batch exports for each row in the 'Export Config' worksheet. Write returned UUIDs into column D. For each successfully created export, fetch its current status and last event timestamp and write those into columns E and F. Mark "Inactive - check config" in column G for any export whose status is not 'Running'.
Create, verify, and flag — one prompt.
Try It
Get the 7-day free trial of SheetXAI and open the Excel workbook where your export configurations live, ask it to create the PostHog batch exports, and have all three running before the sprint standup. Also see: Create PostHog Warehouse Saved Queries From an Excel workbook and the PostHog hub.
