My content engine runs on a cron job at 4 AM every Monday. It: 1. Pulls trending keywords from my research database 2. Generates outlines using Claude 3. Expands outlines into drafts using Gemini 4. Fact-checks and edits with Claude 5. Pushes the final post to WordPress 6. Schedules social media posts
The whole pipeline takes 90 minutes. I wake up to five finished posts ready to review. Most days I publish three of them.
This post is me documenting the pipeline so you can steal the idea.
The philosophy
I'm not trying to automate the thinking. I'm automating the busywork so I can think about the right things.
The pipeline handles:
What it doesn't handle:
So I still have judgment. I've just eliminated the grunt work.
The actual stack
Bash scripts: Orchestration and workflow management Claude API: Outline generation, fact-checking, editing Gemini API: Draft expansion (it's cheaper, fast enough) DataForSEO API: Keyword research WordPress REST API: Publishing Zapier: Social media scheduling (overkill, but I've already paid for it)
Cost per post: $1.20 in API fees Time for me to review and approve: 15 minutes Time to actually write without the engine: 3-4 hours
How it works, step by step
Step 1: Pull keywords from the database
A bash script queries my Airtable database (where I've manually added 40+ target keywords). It picks one at random that hasn't been published yet.
`bash #!/bin/bash KEYWORD=$(curl -s "https://api.airtable.com/v0/base/..." | jq -r '.records[0].fields.keyword') VOLUME=$(curl -s "https://api.airtable.com/v0/base/..." | jq -r '.records[0].fields.volume') `
Simple stuff. Just gets the keyword and search volume.
Step 2: Generate outline with Claude
The script sends Claude a prompt:
` You are an expert SEO writer. Generate a detailed outline for a blog post targeting the keyword: "[keyword]"
The post should:
Return ONLY the outline in markdown format. No preamble. `
Claude returns a structured outline. Takes about 20 seconds.
Step 3: Generate draft with Gemini
I use Gemini Pro for this step because: 1. It's 60% cheaper than Claude per token 2. It's fast enough for routine drafting 3. Gives a different "voice" which helps with variation
The prompt:
` Using this outline, write a complete blog post: [outline]
Write in a conversational, expert tone. Include specific details and examples. Optimize for the keyword: [keyword] `
Gemini generates the full post in about 90 seconds. Often it's actually good enough to publish as-is.
Step 4: Fact-check and edit
This is where Claude comes back. I send the draft to Claude with instructions:
` You are an expert editor. Review this blog post for: 1. Factual accuracy (flag anything uncertain) 2. SEO optimization (keyword placement, headers, structure) 3. Clarity and engagement 4. Specific details (add numbers, statistics, examples where vague)
Return the improved post. Do NOT add hedging language or corporate speak. `
Claude often adds specific numbers, rewrites weak sections, and improves the SEO structure.
Step 5: Publish to WordPress
A script takes the final post and: 1. Formats it as markdown 2. Generates meta descriptions 3. Adds featured image (either pulls from Unsplash or uses a default) 4. Pushes to WordPress as a draft
I then review in WordPress, tweak anything I want, and publish.
Step 6: Social media
Once published, the script pulls the post title and permalink and feeds it to Zapier, which creates social posts for Twitter/LinkedIn/Email list.
What works well
The system is repeatable. Same steps every time. I get consistent output quality.
Gemini is genuinely good at drafting. I expected it to be worse than Claude, but it's not. Different style, but competent.
The keyword database forces intentionality. I can't just let the AI pick random topics. I've decided in advance what I want to rank for.
What's broken
Sometimes Gemini generates posts that are too generic. That's why the fact-check step is critical. I send questionable posts back through Claude to add specificity.
The featured image pulling is inconsistent. I've disabled it for now and either use a default or pick my own.
The whole thing assumes I have a decent backlog of keywords ready to go. If I don't, the engine just waits.
The cost-benefit
I'm spending about $150/month on APIs to generate maybe 60 posts. That's $2.50 per finished post.
If I wrote them manually, that's 3-4 hours per post × $150/hour (my billable rate) = $450-600 per post.
Even accounting for the 15 minutes I spend reviewing each one, the math is obvious.
Why I'm telling you this
The engine works because it's simple and repeatable. No fancy AI frameworks. No machine learning. Just Claude, Gemini, bash, and APIs.
You can build something similar for your business in a weekend if you understand: 1. How to call APIs (easy in bash or Python) 2. How to write good prompts (practice) 3. What part of your process is automatable (the boring parts)
The real skill isn't the technology. It's knowing where the busywork is and being willing to spend a few hours building automation instead of repeating the busywork forever.
I've saved roughly 200 hours per year by building this pipeline. That's the real win.
Extending the system
The basic pipeline I described handles drafting to publishing. But you can extend it:
Post-publishing automation:
Content calendar management:
Link building integration:
Each extension is maybe 2-3 hours to build. Together they add up to a complete content operation that runs mostly without me.
The maintenance question
The pipeline requires maintenance:
Maybe 2-3 hours per month. Not bad for a system that generates 60 posts.
Why this works for me specifically
I'm SEO-focused, so the outputs matter. If the posts don't rank, the system is pointless. I'm willing to invest time in tuning it because the ROI is obvious.
Also, I work alone. No team to convince that this is a good use of time. I can just build it and benefit.
If you're in a team environment, getting buy-in might be harder. But the underlying principle is solid: identify repetitive work, automate the parts that don't require judgment, and reclaim your time for strategy.