AI Content Generator and Multi-Level Publisher to WordPress - n8n Workflow

Automate content creation for WordPress using a powerful n8n workflow. Generate articles with AI, rewrite content for multiple reading levels (Grade 9, 5, 2), and auto-publish drafts with featured images.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content Marketers and Bloggers seeking to scale production using automated n8n templates.

  • Educational Content Platforms needing articles adapted for different reading comprehension levels.

  • Users who require robust content validation and error handling (via Telegram) within their n8n workflow.

  • Developers looking for advanced examples of chained AI prompts and WordPress integration in an n8n node environment.

Overview

Maintaining a high volume of quality content tailored for specific audiences can be highly challenging. This robust n8n workflow solves this by streamlining the entire content pipeline, from ideation to publishing. It leverages specialized AI agents to generate highly structured, HTML-formatted blog posts based on a predefined topic.

Crucially, this n8n template incorporates branching logic to create multiple versions of the article—Grade 9, Grade 5, and Grade 2 reading levels—allowing content teams to cater to diverse audiences without manual rewriting. The final steps automate the complex WordPress process, ensuring the article is created as a draft, a relevant featured image is generated via Pollinations.ai, and the image is correctly associated with the post. This efficient n8n workflow guarantees consistency, reduces production time, and enhances content accessibility.

How it Works

This comprehensive n8n workflow is initiated manually via the n8n trigger node. The logical flow proceeds as follows:


  1. Topic Initialization: The 'Set Blog Topic' n8n node defines the subject matter for the AI generation.

  2. AI Generation: The 'Create Structured Blog Post' (Langchain Agent using gpt-4o-mini) processes the topic against detailed system instructions (HTML formatting, structure, word counts) and outputs the result in JSON format.

  3. Parsing and Validation: The 'Structured Output - JSON' node ensures compliance. The 'Separate Title & Content' n8n node extracts the title and content fields and cleans the HTML. The 'Tiltle & Content Exist?' If n8n node validates the data. If validation fails, an error message is sent via Telegram.

  4. Data Processing & Backup: The content is converted to Markdown for flexibility ('HTML to Markdown') and then saved as a backup draft file using the 'Google Drive' n8n node.

  5. Targeted Rewrites: The primary content is passed to the 'Rewrite for Grade 9 Reading Level' Langchain Agent. Parallel, optional paths exist for Grade 5 and Grade 2 rewrites.

  6. WordPress Posting: The validated Grade 9 content is posted to WordPress as a draft using the 'Create Wordpress Post' n8n node.

  7. Featured Image: The 'pollinations.ai' HTTP Request n8n node generates a featured image based on the article's title. This image data is then uploaded via the 'Upload Image to Wordpress' n8n node and finally associated with the post using the 'Set Image on Wordpress Post' HTTP Request n8n node.

  8. Notification: A final 'Send Success Message' is sent via Telegram, confirming the successful completion of the entire n8n workflow.

Installation Guide

To deploy and utilize this n8n workflow, follow these steps:


  1. Import the n8n Template: Copy the provided JSON code and import it directly into your n8n instance via the 'Workflows' section.

  2. Configure Credentials: Set up the required API credentials for the following services within your n8n environment:

OpenAI: For the Langchain Agent nodes (gpt-4o-mini family).
WordPress: For creating posts and managing media.
Google Drive: For saving content backups.
Telegram: For sending success and error notifications (requires the TELEGRAMCHATID environment variable setup).

  1. Customize Initial Node: Update the 'Set Blog Topic' n8n node with your desired content topic.

  2. Review HTTP Request Nodes: Update the URLs in the WordPress-related HTTP Request nodes ('Upload Image to Wordpress' and 'Set Image on Wordpress Post') to reflect your specific WordPress site URL (e.g., https://[YOUR-WORDPRESS-SITE.com]).

  3. Test the n8n Trigger: Click 'Test workflow' on the manual n8n trigger node to ensure the entire pipeline executes correctly and verifies that a draft post appears in your WordPress dashboard.

Node Details

This n8n workflow utilizes several key nodes and configurations:

When clicking ‘Test workflow’ (n8n trigger): Initiates the entire automation upon manual execution.
Set Blog Topic (Set n8n node): Defines the input payload by setting the topic variable, which is used by the initial AI agent.
Create Structured Blog Post (Langchain Agent): The central content generation n8n node. It uses complex system instructions to force HTML output and specific structural requirements (H2s, word counts). It relies on the gpt-4o-mini Langchain n8n node.
Separate Title & Content (Code n8n node): Custom JavaScript handles the parsing of the structured JSON output, validation, and content cleaning before passing it to subsequent nodes in the n8n workflow.
Rewrite for Grade 9 Reading Level (Langchain Agent): An example n8n node illustrating how to use an AI agent to revise content to a specific complexity level while maintaining HTML formatting and structure. Similar agents exist for Grade 5 and Grade 2.
Google Drive (n8n node): Used to create a text file draft of the generated content for archival or review purposes.
Create Wordpress Post (n8n node): Creates the actual blog post draft in the target WordPress installation, pulling the title and Grade 9 content from previous nodes.
pollinations.ai (HTTP Request n8n node): Dynamically generates a featured image URL using the post title and outputs binary image data.
Upload Image to Wordpress / Set Image on Wordpress Post (HTTP Request n8n nodes): These nodes handle the multi-step process required for media management in WordPress, first uploading the binary file and then setting the returned media ID as the featured image for the post ID created by the 'Create Wordpress Post' n8n node.
Telegram (n8n node): Provides essential error monitoring and success confirmations, crucial for managing a production-ready n8n workflow.

Related n8n Workflows

Free

Nodes: 13 Nodes
Updated: December 26 2025
View all
Created by
Joseph LePage
Joseph LePage

As an AI Automation consultant based in Canada, I partner with forward-thinking organizations to implement AI solutions that streamline operations and drive growth.

Featured*