Run one Claude prompt across every row of a Google Sheet
Pick a column, write one prompt, and let Claude work through thousands of rows at half price while you watch progress and approve results before they land.
Build me an internal app my ops team opens whenever we have a spreadsheet of rows that all need the same Claude treatment. The recurring jobs are things like classifying support conversations into themes, writing product descriptions from a list of attributes, and summarizing free-text survey answers. Today that means pasting rows into a chat window one at a time, so the app has to cover the whole ritual: set up the job, submit it, watch it, review what came back, and write the good answers into the sheet.
The main screen is New Run. I paste or pick a Google Sheets spreadsheet, choose the tab and the range, and the handler calls Get Values to read it. Show me the header row and the first several rows in a small preview table, then let me choose which single column feeds the prompt. Below that, a prompt template box where I write one instruction and reference the chosen column with a placeholder, for example {{column}} or the header name. Substituting each row's cell into that template is what produces one request per row.
Next to the template, a model picker populated by List Models, so the list stays current rather than being hardcoded. Beside it, an estimate panel: take three sample rows, build the exact request each would produce, and call Count Message Tokens on them. Show the estimated input tokens per sample row, the average, and that average multiplied by the total row count as a rough job size. Label it clearly as an estimate of input only. We have no usage or cost reporting available, so do not build a spend dashboard, do not show dollar figures, and do not promise invoice-level tracking. The token estimate is the honest ceiling, and the one cost fact worth stating is that batch requests are billed at half the standard rate.
Submitting sends every row as one job through Create Message Batch, with each request carrying a custom_id built from the sheet row number so results can be matched back later. A batch accepts up to 10,000 requests, so if the selected range has more rows than that, split it into successive batches and group them under one run in the UI. Warn me before submitting anything over a few thousand rows. After submitting, take me to the status board.
The status board lists every job. Use List Message Batches for the overall list and Retrieve Message Batch for the live counts on each one, showing processing status plus how many requests have succeeded, errored, been canceled, or expired, as a progress bar. These batches are asynchronous and can take up to 24 hours, though most finish in under an hour, so the board must refresh when I open the page or click a refresh button. Do not imply anything runs on a schedule and do not build background polling. Each in-progress job gets a cancel button wired to Cancel Message Batch, with a confirm step. Ended jobs can offer an optional cleanup action using Delete Message Batch.
When a job has ended I open its review screen. Fetch the outputs with Get Message Batch Results, which returns JSONL, and join each result back to its original row using the custom_id. Render a table with the original cell text in one column and Claude's answer beside it, one row per input row, with a checkbox on each. Rows that came back as errors show the failure inline and stay unchecked rather than being hidden, so nobody thinks a row silently succeeded. Everything else starts checked. Let me untick anything bad and edit an answer in place before approving.
Approving writes only the checked rows back to the sheet. Give me two destinations: write into a new column beside the original rows using Update Values, aligning each answer to its own row number so nothing shifts, or add the results as new rows on a separate tab using Append Values. Ask which one before writing, show how many rows are about to be written, and report how many landed.
Persist a history of past runs in app storage, each saved with the spreadsheet and tab, the column that was used, the full prompt template text, the model, the batch ids, the row count, the submitted and finished timestamps, how many results were approved, and who submitted it. Everyone in the workspace sees all runs. Opening a past run shows its prompt and results, and a rerun button refills the New Run form with the same template, column, and model so the same job next month takes one confirmation instead of a rebuild.
What does this prompt do?
- Reads a Google Sheet you choose and lets you point at the one column that feeds your prompt, so classifying support themes, writing product descriptions, or summarizing survey answers all use the same setup
- Shows an estimate of how much text each row will send, next to a picker for the Claude model you want, before you commit to anything
- Sends the whole sheet as one background job that Anthropic bills at half the standard rate, with a board showing every job, its progress, and a cancel button
- Puts Claude's answers in a table beside the original rows so you can untick the bad ones, then writes only the approved answers back to a new column or a results tab
- Keeps a history of past runs with the exact prompt used, so next month's run is one click
What do I need to use this?
- A Google account that can open and edit the spreadsheet you want to work from
- An Anthropic account with an API key
- A sheet where the text you want Claude to work on lives in a single column, with a header row
- An empty column or a spare tab where the approved answers can be written
How can I customize it?
- Change the prompt wording and which column it pulls from for each kind of job, whether that is tagging themes, drafting copy, or summarizing answers
- Switch the Claude model in the picker to trade speed against depth on longer rows
- Choose whether approved answers land in a new column beside the original rows or get added to a separate results tab
- Adjust how many sample rows are used for the size estimate before you submit
FAQs
How long does a job take to finish?
Is it really half the cost?
How many rows can I send at once?
What happens if Claude gets some rows wrong?
Can I run the same job again next month?
Does anything run on a schedule?
Related templates
Stop buying stale lists. Reps run a saved search, work the results like an inbox, and only the accounts they approve ever reach your CRM.
Drag creators through Sourced to Wrapped on a board grouped by campaign, with audience stats on every card and a one-click brief for each creator.
Pick a repricing rule, send an assistant out to check competitor pages, then approve the new prices that clear your margin floor.
See the projected bounce rate for any outbound send before it goes out, and keep the launch button locked until the list is clean enough to be safe.
Pick any date range and see what each device in your home actually cost to run, not just how many kilowatt-hours it used.
Search three months of global coverage on your topic, rank the outlets actually writing about it, and draft a tailored pitch for each one.
Stop pasting rows into a chat window one at a time.
Give your ops team one screen for the whole spreadsheet, from prompt to approved results, at half the cost of doing it row by row.