Nightly bulk content drafts from a Google Sheets backlog
Every night at 2am, Claude drafts copy for every unwritten row in your content backlog sheet at half price, so mornings start with fresh drafts to review.
Every night at 2am, I want a code workflow that drains my content backlog spreadsheet through Anthropic's Claude Message Batches API. Batch mode is 50% of the standard price, so this is how I want to bulk-draft copy affordably instead of hitting rate limits during the day.
Step 1. Read from Google Sheets. Use the Get Values operation on the 'Content Queue' tab of a Google Sheet whose ID is configurable. Assume the header row includes columns for row number, topic, content type, brand voice, draft, and status. Only pick up rows where topic and content type are filled in but the draft column is empty.
Step 2. Build the batch. For each eligible row, up to a configurable per-run cap (default 100), build one Claude message request. The prompt should combine the row's topic, content type (blog intro, LinkedIn post, product description, etc.), and any brand voice notes from that row into a clear instruction. Set custom_id equal to the row number so results can be matched back to the correct row later.
Step 3. Submit and wait. Call Anthropic's Create Message Batch with all the requests in one payload. Then poll Retrieve Message Batch on an interval until processing_status is 'ended'. Once it has ended, pull the JSONL from Get Message Batch Results.
Step 4. Write drafts back. Parse each JSONL line and use Google Sheets Batch Update Values to write the generated text into the draft column of the row whose row number matches the custom_id. In the same batch update, flip that row's status column to 'drafted'. If Claude returned an error for a row, leave the draft empty and write a short error note to the status column so I can retry it on the next nightly run.
Make these easy to change from workflow settings: the spreadsheet ID, the tab name, the per-run cap, the trigger time, and which Claude model is used. Include a hard safety limit so a single night can never process more than the cap, even if the sheet grows.
Use a code workflow because the pipeline is fully deterministic: read the sheet, submit one batch, poll for completion, write the results back. No agent reasoning required.
What does this prompt do?
- Reads your content backlog spreadsheet overnight and picks up every row that still needs a draft.
- Sends the whole batch to Claude in one overnight run at 50% of the usual per-word cost, with no rate-limit headaches.
- Writes each finished draft back to the correct row and flips a status column so your team can see what is ready for review.
- Caps how many rows are processed per night so a single run cannot blow through your monthly AI budget.
What do I need to use this?
- A Google account with edit access to the spreadsheet that holds your content backlog.
- An Anthropic account (Geni prompts for an API key from your Anthropic console when you connect it).
- A backlog tab with columns for topic, content type, brand voice, draft, and status.
How can I customize it?
- Change the nightly kickoff time, or run it only on weekdays instead of every night.
- Raise or lower the per-run cap to match your team's monthly AI budget.
- Swap the Claude model (for example, use a lighter model for social posts and a heavier one for long-form pieces).
- Add extra columns like target keyword, audience, or word count so the drafts come out more on-brand.
FAQs
How is this cheaper than drafting one row at a time?
What if the batch is not finished by morning?
Will this overwrite drafts my team has already edited?
Can I use this for things other than marketing copy?
What happens to rows missing a topic or content type?
Related templates
Every weekday at 10am, an AI voice agent phones your most overdue Xero accounts, logs what each customer promised, and reports back to finance in Slack.
See every Google Maps listing you manage on one screen, ranked worst first, with an audit button that writes the fix list for you.
Your team picks a template, finds the customer, checks they are safe to email, then sends it, with every send logged where the whole team can see it.
Every night at 2am, pull the contacts on your open and won deals and block them from your cold outreach before the next send goes out.
Build every text campaign in one screen: check who is actually reachable, see a realistic send plan, then watch delivery land row by row.
See every LinkedIn ad account's spend against the budget you committed to, catch overspend early, and rebalance without rebuilding a spreadsheet.
Turn your content backlog into finished drafts by breakfast.
Connect Google Sheets and Claude once, and Geni drafts hundreds of rows overnight at half the usual cost.