AI-Powered Content Generation and WordPress Publishing - n8n Workflow

Use this comprehensive n8n workflow to fully automate blog content creation, image generation via AI, SEO optimization (RankMath), and instant publishing to WordPress.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Content marketers and agencies needing high-volume, automated content production.
SEO specialists looking to integrate RankMath optimization into their publishing pipelines.
Developers and n8n users seeking advanced AI automation using LangChain and custom HTTP requests.
Blog administrators who rely on Airtable for managing content queues.

Overview

Managing a high-volume content schedule manually can be challenging. This advanced n8n workflow solves this by providing a hands-free content factory. It starts by pulling content requirements and brand guidelines from Airtable. Using powerful AI language models via the LangChain n8n node, it automatically structures, writes, and formats blog posts. Crucially, the n8n workflow also includes steps for generating a relevant featured image using a third-party image API (like Leonardo AI, referenced by 'Leo' nodes) and optimizing the post's SEO fields via RankMath before publishing to WordPress. This complex automation template showcases the power of a fully integrated n8n setup for marketing and publishing operations. It is a robust example of a sophisticated n8n workflow.

How it Works

The process begins when the n8n trigger (manual or configured Airtable/Form trigger) initiates the flow.


  1. Input Gathering: The workflow uses two Airtable n8n node steps (GET Brand Guidelines and GET Keywords) to retrieve necessary context and target keywords.

  2. Preparation and Looping: Data is aggregated and then split using the Loop Over Items n8n node, allowing the workflow to process multiple content requests sequentially.

  3. AI Content Structuring: An initial LangChain OpenAI n8n node (Create post title and structure) uses the retrieved data to outline the post (title and chapter headings).

  4. Chapter Generation: The structure is split, and another LangChain OpenAI n8n node (Create chapters text) generates the detailed text for each section.

  5. Article Assembly: Chapters are merged, and a Code n8n node (Final article text) formats the content into the final HTML structure.

  6. Publishing & SEO: The article is posted to WordPress. Immediately afterward, an AI n8n node handles SEO Update for RankMath, generating meta descriptions and focus keywords, which are applied using an HTTP Request n8n node that interacts with the RankMath API.

  7. Image Generation: Concurrently, an image prompt is generated by AI. A series of HTTP Request n8n node calls are executed—including one for generating the image (Leo - Generate Image) and a subsequent Wait n8n node to await completion. The image is downloaded, uploaded to WordPress, and set as the featured image.

  8. Notification & Status Update: Finally, a Slack n8n node sends a notification, and the Airtable record is updated using an Airtable n8n node, marking the content as published.

Installation Guide


  1. Import: Copy the provided n8n workflow JSON and paste it into your n8n instance using the 'Import Workflow' function.

  2. Credentials Setup: You must configure credentials for the following services:

Airtable: For retrieving input data and updating status.
OpenAI/Anthropic (LangChain nodes): For all AI text generation tasks.
WordPress: For publishing content and media uploads. This may require basic authentication or application passwords, depending on your setup.
Slack: For post-completion notifications.
* Custom Image API (Leo/Leonardo): Configure the necessary API keys and URLs within the HTTP Request n8n node settings (e.g., Leo - Generate Image, Leo - Improve Prompt).

  1. Trigger Activation: By default, the testing n8n trigger is active. For production use, configure the Form or Airtable Trigger n8n node and activate the workflow.

Node Details

Manual Trigger / Airtable Trigger: The starting n8n trigger point for the entire content automation process.
Airtable (GET Keywords/Guidelines): Fetches the central topic, target keywords, and specific brand voice instructions needed by the AI.
LangChain OpenAI (Create post title and structure): A crucial AI n8n node that uses advanced prompting to define the logical flow and sections of the resulting blog post.
Split Out (Split out chapters): Breaks the structured output from the AI into individual items, allowing the subsequent AI step to focus on writing one chapter at a time for better coherence.
LangChain OpenAI (Create chapters text): Generates the detailed, long-form content for each chapter based on the provided heading and context.
Code (Final article text): Used to perform final data transformation, cleaning, and necessary formatting (like converting Markdown to HTML or wrapping content in specific divs) before publishing.
Wordpress (Post on Wordpress): The primary publishing n8n node, responsible for sending the title, content, and metadata to your WordPress site.
LangChain OpenAI (SEO Update for RankMath): Generates high-quality, targeted SEO titles and descriptions, demonstrating how n8n templates can integrate optimization seamlessly.
HTTP Request (Image Generation Steps): A series of n8n node steps dedicated to interacting with the external image generation service (Leo), including prompt improvement, generation, status polling (via Wait), downloading the image, and finally uploading it to WordPress.
Slack (POST Blog Info): Sends alerts confirming successful publication, complete with the new article link. This shows the notification capability of this n8n workflow.

Related n8n Workflows

Paid

Nodes: 24 Nodes
Updated: December 26 2025
View all
Created by

n8n Ambassador & Verified Partner

Featured*