🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 21, 2026

WordPress + OpenAI: SEO drafts ready to review

Lisa Granqvist Partner Workflow Automation Expert

Writing “just one blog post” has a way of turning into a whole afternoon. Topic research, outlines, draft writing, finding a decent featured image, formatting for WordPress, then realizing you forgot the meta basics and starting over.

This WordPress AI drafts automation hits marketing managers first, honestly. But agency owners pushing content for multiple clients and solo founders trying to stay consistent feel it too. The outcome is simple: you submit keywords, and a review-ready WordPress draft (with a featured image) shows up for you to tweak and publish.

Below you’ll see how the workflow runs, what it automates end-to-end, and what you can customize so the output sounds like your brand instead of “generic AI blog.”

How This Automation Works

Here’s the complete workflow you’ll be setting up:

n8n Workflow Template: WordPress + OpenAI: SEO drafts ready to review

Why This Matters: Publishing SEO content without the busywork

Most content teams don’t struggle with ideas. They struggle with throughput. You start with a keyword list, then you bounce between tabs for research, try to force an outline into shape, write sections that don’t quite flow, and then lose another chunk of time formatting headings and lists so WordPress doesn’t look like a wall of text. The featured image is its own mini-project, and it’s easy to end up with something off-brand or painfully stock-photo. Multiply that by a weekly cadence (or several clients) and the mental load becomes the real blocker.

The friction compounds. Here’s where it breaks down in real life.

  • Keyword research lives in one place, drafts live in another, and you waste time copying and reformatting the same info.
  • Outlines are inconsistent, so writers (or you) end up rewriting structure before the writing even starts.
  • Factual details get hand-waved, which means more editing, more second-guessing, and occasional embarrassing corrections.
  • Images become a last-minute scramble, so posts ship late or ship with “good enough” visuals.

What You’ll Build: Keyword-to-draft WordPress publishing with AI

This workflow turns a small input (a few keywords and basic settings) into a complete WordPress draft that’s ready for review. It starts with an intake form, then uses OpenAI to generate a sensible SEO-friendly structure: a title, subtitle, and a chapter plan that actually flows. Next, it writes each chapter with awareness of what came before and what comes after, so the piece reads like one article, not stitched-together sections. While the text is being created, the workflow also pulls factual context via a Wikipedia lookup step to ground the content in real references. Finally, it assembles everything into clean HTML formatting, creates a custom featured image with DALL·E, uploads that image to WordPress, and attaches it to the draft post automatically.

The workflow begins when you submit keywords through the n8n form. From there, OpenAI plans the post, writes chapters, and the workflow merges everything into a single formatted article. WordPress receives a draft plus an uploaded featured image, so you can edit quickly and publish when it’s ready.

What You’re Building

Expected Results

Say you publish 3 posts a week. Manually, a “decent first draft” often takes about 2 hours to research, outline, write, format, and hunt down an image, so you’re looking at roughly 6 hours weekly before edits even start. With this workflow, you spend about 5 minutes submitting keywords, then wait a few minutes while it generates the draft and featured image. You get most of that writing time back and can put it into real editing, internal links, and product CTAs.

Before You Start

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • WordPress site for creating draft posts via REST API
  • OpenAI to generate outlines, chapters, and images
  • WordPress Application Password (get it from WordPress Admin → Users → Profile)

Skill level: Beginner. You’ll connect accounts, paste an API key, and confirm your WordPress REST API works.

Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).

Step by Step

A form submission triggers everything. You enter comma-separated keywords, choose how many chapters you want, and set a max word count. Submitting the form starts the workflow immediately.

The workflow sets your WordPress “defaults.” n8n loads your site URL and key settings (so you’re not retyping them each time), then prepares the prompt for the AI outline step.

OpenAI plans and writes the article in sections. First it creates the title and structure, then n8n validates the payload so you don’t end up publishing a broken draft. After that, the workflow expands the chapter list and generates each chapter’s text with context, pulling extra factual grounding using a Wikipedia lookup tool when needed.

WordPress receives a draft plus a featured image. n8n merges chapters, assembles formatted HTML, publishes the post as a draft, generates a DALL·E image, uploads it to your media library, and attaches it as the featured image. If anything fails, the workflow returns a clear success or error response.

You can easily modify the chapter structure to match your editorial template based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Form Trigger

This workflow starts when a user submits a form. Configure the form fields and response handling in Intake Form Trigger.

  1. Add the Intake Form Trigger node and set Path to create-wordpress-post.
  2. Set Form Title to Create a WordPress post with AI and Form Description to Fill this form with the required information to create a draft post on WordPress.
  3. Configure the form fields: Keywords (comma-separated), Number of chapters (dropdown with options 110), and Max words count.
  4. Set Response Mode to responseNode so the workflow can return success or error messages.

Step 2: Connect WordPress Settings

Map form inputs to internal settings and define the WordPress base URL in Assign WP Settings.

  1. Add Assign WP Settings and create assignments for wordpress_url, keywords, chapters, and words.
  2. Set wordpress_url to https://you-wordpress-url-here.com/.
  3. Map keywords to {{ $json['Keywords (comma-separated)'] }}, chapters to {{ $json['Number of chapters'] }}, and words to {{ $json['Max words count'] }}.

Step 3: Generate and Validate the AI Outline

Create the article outline and validate the AI payload before generating chapter content.

  1. Add Generate Article Outline and set the model to gpt-4-1106-preview with JSON Output enabled.
  2. Use the existing prompt content in Generate Article Outline to produce the JSON structure for title, subtitle, introduction, chapters, conclusions, and image prompt.
  3. Credential Required: Connect your openAiApi credentials for Generate Article Outline.
  4. Note that Wikipedia Lookup Tool is used by Generate Article Outline; add credentials to the parent node if needed. Do not add credentials on the tool node itself.
  5. Add Validate AI Payload and keep the conditions checking {{$json.message.content.title}}, {{$json.message.content.chapters}}, {{$json.message.content.subtitle}}, {{$json.message.content.introduction}}, {{$json.message.content.conclusions}}, and {{$json.message.content.imagePrompt}}.

⚠️ Common Pitfall: If any of the validation fields are empty, the workflow will route to Return Error Response and stop. Ensure the AI prompt and JSON output are correct.

Step 4: Expand Chapters and Compose Text in Parallel

Split chapters into items and generate chapter text in parallel with data preparation.

  1. Add Expand Chapter List and set Field to Split Out to message.content.chapters.
  2. Expand Chapter List outputs to both Combine Chapter Data and Compose Chapter Text in parallel.
  3. Add Compose Chapter Text and keep the prompt content referencing {{ $('Generate Article Outline').item.json.message.content.title }}, {{ $('Assign WP Settings').item.json["keywords"] }}, and the chapter-specific fields.
  4. Credential Required: Connect your openAiApi credentials for Compose Chapter Text.
  5. Add Combine Chapter Data with Mode set to combine and Combination Mode to mergeByPosition to merge chapter titles with generated text.

Step 5: Assemble HTML and Publish the Draft

Assemble article HTML, publish the WordPress draft, then generate and upload the cover image.

  1. Add Assemble Article HTML and keep the JavaScript that concatenates introduction, chapter titles, chapter text, and conclusions.
  2. Configure Publish Draft to WP with Title set to {{ $('Generate Article Outline').all()[0].json.message.content.title }} and Status set to draft, with Content set to {{ $json.article }}.
  3. Credential Required: Connect your wordpressApi credentials for Publish Draft to WP.
  4. Configure Generate Cover Image with Resource set to image and Prompt set to Generate a photographic image to be used as the cover image for the article titled: {{ $('Generate Article Outline').all()[0].json.message.content.title }}. This is the prompt for the image: {{ $('Generate Article Outline').all()[0].json.message.content.imagePrompt }}, photography, realistic, sigma 85mm f/1.4.
  5. Credential Required: Connect your openAiApi credentials for Generate Cover Image.
  6. Configure Upload Media Asset with URL https://wp-demo.mondo.surf/wp-json/wp/v2/media, Method POST, and Content Type binaryData. Keep the header Content-Disposition as attachment; filename="example.jpg".
  7. Credential Required: Connect your wordpressApi credentials for Upload Media Asset.
  8. Configure Attach Featured Media with URL https://wp-demo.mondo.surf/wp-json/wp/v2/posts/{{ $('Publish Draft to WP').item.json.id }} and query parameter featured_media set to {{ $json.id }}.
  9. Credential Required: Connect your wordpressApi credentials for Attach Featured Media.

⚠️ Common Pitfall: Ensure the WordPress site URL and API authentication match the domain used in Upload Media Asset and Attach Featured Media to avoid 401 errors.

Step 6: Add Error Handling and Success Responses

Return user-friendly responses for both success and failure paths.

  1. Connect the failure output of Validate AI Payload to Return Error Response.
  2. Keep Return Error Response Respond With set to json and Response Body set to { 'formSubmittedText': 'There was a problem creating the article, please refresh the form and try again!' }.
  3. Connect Attach Featured Media to Return Success Response with Response Body set to { "formSubmittedText": "The article {{ $json.title.rendered }} was correctly created as a draft on WordPress!" }.

Step 7: Test & Activate Your Workflow

Run a full test to validate AI output, WordPress draft creation, and media attachment before turning the workflow on.

  1. Click Execute Workflow and submit the Intake Form Trigger with sample keywords, chapters, and max word count.
  2. Confirm Validate AI Payload routes to the success path, and that Publish Draft to WP creates a draft post with HTML content.
  3. Verify Upload Media Asset and Attach Featured Media complete, and the WordPress draft has a featured image.
  4. Check the final response from Return Success Response includes the rendered title.
  5. Toggle the workflow to Active to accept live form submissions.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Troubleshooting Tips

  • WordPress credentials can expire or have limited permissions. If things break, check your Application Password in WordPress Admin → Users → Profile first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Quick Answers

What’s the setup time for this WordPress AI drafts automation?

About 30 minutes if your WordPress credentials and OpenAI key are ready.

Is coding required for this WordPress AI drafts?

No coding required. You’ll mostly connect WordPress and OpenAI credentials, then adjust a few prompts and settings.

Is n8n free to use for this WordPress AI drafts workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs for GPT-4 and DALL·E (most teams spend a few dollars to test, then scale based on volume).

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I modify this WordPress AI drafts workflow for different use cases?

Yes, and you should. You can adjust the “Generate Article Outline” and “Compose Chapter Text” nodes to enforce your house style (tone, reading level, CTA placement), and tweak “Assemble Article HTML” to match your preferred heading rules. Common customizations include adding a FAQ section, inserting internal-link suggestions, and generating WordPress tags/categories automatically.

Why is my WordPress connection failing in this workflow?

Usually it’s an authentication issue: the Application Password is wrong, revoked, or tied to a user without permission to create posts. Also confirm your REST API endpoint is reachable (try loading /wp-json/wp/v2/ in a browser) and that security plugins aren’t blocking requests. If failures happen only during upload/attach steps, check that your WordPress user can upload media and that your hosting isn’t rejecting larger requests.

What volume can this WordPress AI drafts workflow process?

It scales well for small teams: dozens of drafts per week is realistic if your OpenAI rate limits allow it.

Is this WordPress AI drafts automation better than using Zapier or Make?

Often, yes. This workflow benefits from n8n’s ability to validate AI output, loop through chapters, merge results, and handle multi-step publishing without turning into a mess of separate zaps/scenarios. Self-hosting also matters if you plan to generate lots of drafts, since execution costs can stay predictable. Zapier or Make can still be fine for very simple “keyword in, draft out” prototypes, but they get awkward once you add chapter loops and media handling. If you want a second opinion before you commit, Talk to an automation expert.

Once this is running, your “blank page” problem turns into a quick review loop. The workflow handles the repeatable parts, and you keep the final say before anything goes live.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal