Customer Reviews to Benefit Image Ads
Chart which benefits 4–5 star reviewers talk about most, then generate flat Meta image ads for the themes you pick.
Copy this prompt & paste into Claude Code
Build a small tool that turns 4–5 star reviews into a benefit frequency chart, then generates flat Meta image ads for the benefits you pick — using the Static Ads Lab API.
Turn a customer reviews export into a simple benefit frequency chart, then generate flat Meta-ready image ads for the benefits you pick.
Stack: TypeScript, Express, Vercel AI SDK, Google Gemini, Static Ads Lab API.
What it builds
A small Express server with a vanilla web UI. Upload a CSV of reviews, the server keeps the 4-star and 5-star rows, and Gemini extracts short signals and verbatim snippets from each review before grouping them into benefit themes with counts. You see a bar chart of those counts, choose which benefits and design templates to use, and the server generates one flat image ad per benefit × template pair.
Key patterns
- Two-pass Gemini analysis — per-review signal and snippet extraction, followed by a cross-review pass that groups signals into benefit themes and counts supporting reviews
- One prompt per ad combining the benefit theme and the best supporting review, so Static Ads Lab writes on-template copy without manual text-node injection
- Batch flat image ad creation with parallel
POST /v1/image-adscalls and batched status polling viaGET /v1/image-ads?ids=... - Server-only API keys — the browser never touches Gemini or Static Ads Lab secrets
- Workspace gate — the dev server shows a strip listing any missing keys or recipe constants so it's obvious what to fill in before you can generate
Prerequisites
- Node.js 20+
- A Google AI Studio key for Gemini
- A Static Ads Lab API key with wallet balance
- Brand, product, audience, and design template IDs already set up in your workspace
- A CSV of customer reviews with
ratingandreviewcolumns
Quick start
cd recipes/reviews-to-benefit-image-ads
npm install
cp .env.example .env
# Add keys to .env and fill ids in src/config/recipe-constants.ts
npm startOpen http://localhost:9001 — upload a CSV, review the benefit chart, pick benefits and design templates, 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.