I Built an Automated WordPress Publishing Pipeline to Beat Draft Paralysis

Some links in this article are affiliate links to products I actually use. If you sign up through them, I may earn a small commission — at no extra cost to you.
I had seventeen draft posts sitting in WordPress when I started building this pipeline. Some were two years old. The ideas were solid, but the gap between “finished writing” and “actually published” had become this massive friction point that killed my momentum every time.
The problem wasn’t the writing itself. It was everything else: finding a decent featured image, writing the SEO fields, creating tags that didn’t already exist, formatting the excerpt. Death by a thousand tiny decisions. So I automated the entire publishing workflow using n8n, Claude, Google Imagen 4, and the WordPress REST API.
Why Automation Made Sense Here
Publishing friction is particularly brutal because it happens when your creative energy is already spent. You’ve done the hard thinking, structured your argument, written the thing. Then WordPress wants you to become a metadata librarian.
The solution isn’t to rush through these steps or skip them entirely. SEO matters, featured images matter, proper tagging matters. But none of these tasks require the same cognitive energy as writing. They’re perfect candidates for automation.
This pipeline handles the entire production process. I write content in my usual editor, send it through the workflow, and get back a fully published post with generated images, proper SEO fields, and contextual tags.
The Complete Workflow
The n8n workflow accepts a simple prompt via HTTP POST and orchestrates everything from there. Claude generates the article content following my style guide, along with all the metadata: excerpt, SEO title, meta description, focus keyword, and tags. Google Imagen 4 creates a featured image in my preferred retro lab illustration style. The workflow then handles all the WordPress complexity: upserting tags, creating the post as a draft, attaching the featured image, and writing Rank Math SEO fields through a custom REST API endpoint.
One detail that matters more than you’d expect: the featured image filename is automatically derived from the article’s focus keyword. If Claude chooses ‘automated WordPress publishing’ as the focus keyword, the image lands in your media library as ‘automated-wordpress-publishing.png’ rather than some generic string. Small thing, but it keeps your media library organised.
Setting Up the Pipeline
API Credentials You’ll Need
Four services require authentication. Anthropic for Claude access, Google AI Studio for Imagen 4 (accessed through the Gemini API), WordPress Application Passwords for REST API access, and Slack OAuth if you want notifications. The WordPress Application Password is the trickiest bit—generate it in your user profile, not the main settings. You’ll get a password that looks like random characters separated by spaces.
Core Configuration
The CONFIG node in n8n holds your key settings. WORDPRESS_URL is your site’s base URL without trailing slashes. AUTHOR_ID is your WordPress user ID—check the users page in wp-admin. DEFAULT_CATEGORY_ID determines where posts land if you don’t specify otherwise. SLACK_CHANNEL is optional but useful for notifications. ENABLE_IMAGE_GENERATION lets you toggle image creation on and off. IMAGE_STYLE_PROMPT defines your visual style. WEBHOOK_SECRET secures your endpoint. TONE_GUIDE and STYLE_GUIDE shape how Claude writes.
Customising Your Voice
The TONE_GUIDE and STYLE_GUIDE fields are where this becomes yours rather than mine. Claude is remarkably good at following detailed style instructions. I include sentence structure preferences, vocabulary choices, things to avoid, and specific formatting rules. The more specific you are about your voice, the better the output. Don’t just say “write clearly”—explain what clarity means to you.
Image Generation Toggle
ENABLE_IMAGE_GENERATION exists because image generation is slow and costs more than text generation. During development, I turned it off constantly. Even in production, sometimes you want fast text-only drafts. When enabled, Google Imagen 4 creates images based on your style prompt plus contextual details from the article. When disabled, the workflow skips image generation entirely and creates posts without featured images.
Security Setup
The WEBHOOK_SECRET protects your endpoint from random internet traffic. Set it to a long random string, then include it as a Bearer token when triggering the workflow. Without the correct token, the workflow rejects the request. This isn’t production-grade security, but it keeps casual bots and mistake requests out.
WordPress Integration
WordPress’s REST API handles most of what we need, but Rank Math SEO fields require custom endpoint registration. I wrote a minimal mu-plugin called rank-math-rest.php that registers the necessary meta fields for REST API access. The plugin adds focus keywords, SEO titles, and meta descriptions to the post endpoint. Without this plugin, the workflow can create posts and handle basic fields, but the SEO metadata won’t stick.
The mu-plugin approach is cleaner than a full plugin because it’s always active and doesn’t clutter your plugins list. Drop the file in wp-content/mu-plugins/ and WordPress loads it automatically.
Triggering the Workflow
Once everything’s configured, triggering is straightforward: HTTP POST to your n8n webhook URL with your prompt in the request body and your Bearer token in the Authorization header. The prompt can be anything from a rough topic to detailed instructions. Claude adapts to whatever level of specification you provide.
I typically send prompts like “Write about the trade-offs between n8n and Zapier for technical users” or “Explain how I set up automated invoice processing using OCR and webhooks”. Claude generates appropriate content following my style guide, and the workflow handles everything else.
What This Actually Solves
This pipeline eliminates production friction, not creative friction. It won’t turn bad ideas into good articles or replace the thinking that makes content worth reading. What it does is remove the tedious gap between “I’ve written something worthwhile” and “it’s actually published”.
I still write badly sometimes. I still struggle with structure and clarity. But I don’t abandon finished pieces because WordPress wants me to hunt for stock photos and write meta descriptions. The pipeline handles the metadata machinery so I can focus on the ideas that matter.

