Customer Reviews to Personas to Image Ads
Turn customer reviews into buyer personas and Meta-ready image ads.
Copy this prompt & paste into Claude Code
Build an internal tool that turns customer reviews into persona-specific static ads using the Static Ads Lab API.
Turn a customer reviews export (4-5 star reviews) into buyer personas with Gemini, then batch-create audiences and Meta-ready image ads.
Stack: TypeScript, Express, Vercel AI SDK, Google Gemini, Static Ads Lab API.
What it builds
A small Express server with a vanilla UI. Upload a CSV of reviews, infer buyer personas with AI, select personas, then generate one image ad per persona × template combination.
Key patterns
- Batch image ad creation with parallel
POST /v1/image-adscalls - Batched status polling via
GET /v1/image-ads?ids=...(one request per tick, not N) - Server-only API keys — the browser never touches secrets
localStoragefor generation session persistence across page refreshes
Prerequisites
- Node.js 20+
- A Google AI Studio key for Gemini
- A Static Ads Lab API key
- Brand, product, and design template IDs already set up in your workspace
Quick start
cd recipes/reviews-to-persona-image-ads
npm install
cp .env.example .env
# Edit .env and src/config/recipe-constants.ts with your IDs
npm startOpen http://localhost:9000 — paste or upload a CSV, infer personas, select the required number, and generate ads.
For AI coding agents
Each recipe includes a prompt.md file designed to be handed directly to Claude Code, Cursor, or your preferred AI coding assistant. It contains the project's intent, architecture, edit points, and suggested next tasks.