🧠 n8n Blog Automation Workflow — GPT-5 Optimized
End-to-end automation of SEO-optimized WordPress blog creation powered by upgraded GPT-5-based LLM agents, real-time data gathering, intelligent content structuring, and optional AI-driven image generation.
This workflow uses enhanced, role-specific prompts tailored for GPT-5 to maximize factual accuracy, SEO impact, and stylistic consistency.
📌 Overview
The system accepts blog parameters from a form, dynamically fetches WordPress categories, and produces a complete, publication-ready post through an orchestrated sequence of GPT-5 agents.
Each agent executes once in a strict order with clearly defined responsibilities.
Core Capabilities
- Real-time search and fact retrieval (OpenRouter / Perplexity Sonar)
- SEO-focused outline planning
- Structured section creation
- Expert-level section writing with inline HTML citations
- Editorial refinement into cohesive, polished HTML
- Metadata and featured-image prompt generation
- Automated category assignment and draft publishing to WordPress
🔁 Trigger
Form Trigger collects:
- Keywords
- Word count
- Number of sections
- Writing style
- Website URL
- Featured image toggle
🧠 Orchestration Agent (GPT-5)
Central Director agent optimized for GPT-5 that coordinates the pipeline:
- GetOnlineInfo — Current Q&A and search-driven insights
- OutlinePlanner — SEO-structured Table of Contents
- createSections — ToC → detailed section definitions
- SectionsWriter — Expert, citation-rich content
- Editor — Full HTML assembly, SEO and legal compliance
- MetaInfo — Title, slug, meta description, category selection
- ImagePrompt — Realistic cover image prompt + alt text (if enabled)
✍️ Writing Flow
- Real-time data retrieval
- SEO-optimized outline creation
- Section breakdown with clear descriptions
- Detailed section drafting with verified sources
- Editorial polishing into publish-ready HTML
- Metadata generation (title, slug, description, category)
- Optional image prompt creation and upload
- Automatic WordPress draft publishing
✅ Output Format
{
"toc": "Table of Contents",
"post_html": "<final HTML content>",
"meta_data": {
"title": "...",
"slug": "...",
"description": "..."
},
"image_data": {
"image_prompt": "...",
"alt_text": "..."
},
"ready": true
}
🌐 WordPress Integration
- Authenticated API calls to
/wp-json/wp/v2/posts
and /wp-json/wp/v2/media
- Draft mode publishing with category & author assignment
- Featured image creation, resizing, and metadata linking (if enabled)
🧩 Setup Instructions
1. Required Credentials
- WordPress API credentials
- OpenAI API key
- OpenRouter API key (optional)
2. Sub-Workflows Required
- OutlinePlanner
- createSections
- SectionsWriter
- Editor
- MetaInfo
- ImagePrompt (if enabled)
Each must support input via:
{"query": "<text>"}
3. Dynamic Inputs
- Categories fetched via WP REST API and shown in the form
- Image creation can be toggled (
true
/ false
)
📸 Optional Image Pipeline
If enabled:
- Generate image prompt and alt text
- Create realistic cover image (1024x1024)
- Resize and upload image to WordPress
- Set image metadata and assign featured image
💡 Notes
- GPT-5 prompts embedded in each agent ensure high-quality, context-aware output
- All HTML and JSON outputs are validated before publication
- Modular sub-workflows allow isolated testing and debugging
- Workflow supports legal accuracy, SEO performance, and dynamic web data responsiveness