If you are building a content pipeline in n8n and publishing to WordPress, you will quickly hit a frustrating limitation: the built-in WordPress node can create a post, but handling the full publishing workflow (especially featured images and Yoast SEO fields) is often incomplete or unreliable for advanced use cases.

The good news is that you can solve this cleanly using a combination of:

  • n8n’s WordPress node (or HTTP Request node)
  • WordPress REST API
  • WordPress Media endpoint
  • A small custom code snippet in your WordPress theme (free)
  • A structured n8n workflow with a few HTTP steps

This guide walks through a production-friendly setup that lets you:

  1. Create a post in WordPress
  2. Upload a featured image via the WordPress REST API
  3. Assign that image as the post’s featured image
  4. Save Yoast SEO title, meta description, and focus keyword (without a paid plugin)
  5. Troubleshoot common errors (including file upload and metadata issues)

This approach is especially useful if you are generating content from AI tools, Google Docs, Notion, Sheets, or any structured content source and want a repeatable publishing workflow.

Why the Default n8n WordPress Integration Is Not Enough

The native n8n WordPress integration is useful for basic post creation, but many users run into issues when trying to automate a complete editorial workflow.

Typical limitations include:

  • No reliable one-step creation of post + uploaded featured image
  • Difficulty passing binary file data directly to media upload in the way WordPress expects
  • No built-in support for writing Yoast SEO fields (SEO title, meta description, focus keyword)
  • Poor visibility when something silently fails (e.g., post updates succeed but metadata is ignored)

As a result, many workflows appear to work “partially”:

  • the post is created ✅
  • the featured image uploads ✅
  • but the image is not assigned ❌
  • or Yoast fields do not save ❌

The key is understanding that these are separate operations in WordPress, and each one often needs its own API request.

Final Workflow Architecture (What We’re Building)

A reliable n8n workflow usually looks like this:

  1. Generate / collect content
    • Title
    • Body content (HTML or Gutenberg-compatible content)
    • Excerpt
    • SEO fields (SEO title, meta description, focus keyword)
    • Featured image URL or file
  2. Create the post
    • Use n8n WordPress node or WordPress REST API (/wp-json/wp/v2/posts)
  3. Download the image into binary
    • If the image starts as a URL (Google Drive, OpenAI output URL, CDN, etc.)
  4. Upload media to WordPress
    • WordPress REST Media endpoint (/wp-json/wp/v2/media)
    • Send binary with correct headers
  5. Update the post to assign featured_media
    • WordPress REST API (/wp-json/wp/v2/posts/{id})
  6. Update Yoast SEO fields
    • Via a custom free REST endpoint in WordPress that writes post meta

This sequence gives you control and reliable debugging.

Prerequisites

Before you start, make sure you have:

In WordPress

  • Admin or editor access (with API access permissions)
  • Application Passwords enabled (recommended) or another supported auth method
  • Yoast SEO plugin installed (free is fine)
  • Ability to add code to your site (child theme functions.php or Code Snippets plugin)

In n8n

  • HTTP Request node available
  • WordPress credentials (or generic HTTP auth with Basic Auth)
  • A source for your content and image (Google Docs, AI output, Drive, URL, etc.)

Step 1: Create the Post in WordPress

VIP Content

This is a Free, but VIP, piece of content. Put your email address to see the content

Loading...

Your Next Read:

Category:

Got an automation idea?

Let's discuss it.

Or send us an email to [email protected]

Get a FREE
Proof of Concept
& Consultation

No Cost, No Commitment!