Automate WordPress Blog Creation with AI & n8n

Discover how this unique n8n workflow automates WordPress blog posts generation with AI, creating content for multiple reading levels, generating featured images, and publishing drafts seamlessly. Save hours and improve workflow accuracy with our step-by-step guide.
manualTrigger
lmChatOpenAi
wordpress
+8
Workflow Identifier: 1063
NODES in Use: manualTrigger, lmChatOpenAi, outputParserStructured, code, if, markdown, googleDrive, wordpress, httpRequest, stickyNote, telegram

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

Opening Problem Statement

Meet Emily, a small business owner who runs a niche educational blog about emerging technologies. Emily wants to regularly publish insightful, well-researched articles that cater to diverse audiences—from curious beginners to experts. However, writing content that fits multiple reading levels manually takes her several hours per post, and creating engaging images and formatting consumes even more time. On top of that, she sometimes forgets to save drafts or publish on time, leading to missed audience engagement and potential revenue loss.

Emily’s struggle is common: crafting valuable and accessible WordPress blog posts with consistent style and quality is labor-intensive and error-prone. What if she could automate this entire process—including content creation tailored for different reading levels, image generation, and publishing—saving her days each month and freeing time to focus on growing her business?

What This Automation Does

When triggered, this n8n workflow performs several specific actions to streamline blog creation for WordPress:

  • Generates a structured blog post using AI based on a user-defined topic, formatted with proper HTML.
  • Extracts and validates the blog title and main content to ensure readiness for publishing.
  • Creates three rewritten versions of the post content targeted at Grade 9, Grade 5, and Grade 2 reading levels, making the content accessible to varied audiences.
  • Stores the original draft on Google Drive as a backup, ensuring content safety.
  • Creates a draft post in WordPress using the Grade 9 version, preparing content for review and final publication.
  • Generates an engaging featured image using the Pollinations.ai HTTP service based on the blog title.
  • Uploads and sets the featured image in WordPress automatically.
  • Sends Telegram notifications for success or error events, keeping users informed of the workflow status.

Thanks to this workflow, Emily can save several hours per article, ensure consistent quality, and engage her broad readership by delivering tailored content with visual appeal.

Prerequisites ⚙️

  • n8n account (cloud or self-hosted)
  • OpenAI API account with API key (for AI content generation and rewriting)
  • Google Drive account (for draft backups)
  • WordPress account with REST API access and credentials
  • Telegram bot with chat ID for status notifications

Step-by-Step Guide

1. Start the Workflow with Manual Trigger

Navigate to n8n dashboard > click on this workflow > press Execute Workflow or Test Workflow. You should see the manual trigger node labeled “When clicking ‘Test workflow’” become active.

This initiates the entire content automation sequence.

Common mistake: Forgetting to press the trigger causes no downstream actions.

2. Define Your Blog Topic

In the Set Blog Topic node, change the “topic” field to your desired blog post subject, e.g., Why Nostr is the upcoming decentralized network.

This value feeds AI for content generation.

3. Generate Structured Blog Content with AI

The Create Structured Blog Post node uses OpenAI to create an SEO-friendly article complete with headings, paragraphs, and lists in HTML.

This node’s prompt guides AI to produce a blog post in JSON format with { "title": "...", "content": "..." }.

4. Parse and Extract Title & Content

The Structured Output – JSON parser extracts the JSON blog from AI response. Then the Separate Title & Content Code node runs JavaScript to verify and separate the blog’s title and content.

Code Explanation:

try {
  const input = $input.all();
  const output = input[0].json.output.output;
  const title = output.title;
  const content = output.content.replace(/

.*?

/s, '').trim(); return { title, content }; } catch (error) { /* Error Handling */ }

This ensures that content is clean and ready for further processing.

Common mistake: malformed AI response that doesn’t contain required fields might break parsing.

5. Validate Title and Content Presence

The Tiltle & Content Exist? node is an If node checking that both title and content fields are not empty. If validation fails, the workflow sends an error message over Telegram and stops.

6. Convert HTML Content to Markdown

The HTML to Markdown node converts HTML-formatted content to Markdown, preparing it for rewriting stages and easier readability.

7. Rewrite Content for Different Reading Levels

The workflow sends the Markdown content to three different AI Agent nodes, each tasked with rewriting the content at a particular reading level:

  • Grade 9: Uses Rewrite for Grade 9 Reading Level to create a more sophisticated, metaphor-rich version.
  • Grade 5: Rewrite for Grade 5 Reading Level simplifies the text with humor and age-appropriate metaphors.
  • Grade 2: Rewrite for Grade 2 Reading Level breaks down the content to a very simple form for basic comprehension.

Each version is checked by subsequent If nodes to ensure valid title and content before proceeding.

8. Backup Original Draft in Google Drive

The Google Drive node saves a copy of the original AI-generated blog draft as a text file named after the blog title.

Common mistake: Ensure Google Drive node credentials have appropriate write permissions.

9. Create a Draft Post on WordPress

The Create WordPress Post node creates a new draft post using the Grade 9 reading level version as content and the extracted title.

The post status is set to “draft” so you can review before publishing.

10. Generate Featured Image Using Pollinations.ai

The pollinations.ai HTTP Request node calls the API with the blog post title to generate a vibrant image without text overlays.

11. Upload the Image to WordPress

The Upload Image to WordPress node uploads the image file as media with a filename derived from the WordPress post ID.

12. Set the Featured Image on WordPress Post

The Set Image on WordPress Post node updates the draft WordPress post to link the uploaded image as the featured image.

13. Notify via Telegram on Success or Error

If all prior steps succeed, the Send Success Message node sends a notification that the blog post was created. If any validation errors occur (missing title/content), respective Telegram error messages are sent from the workflow’s conditional branches.

Customizations ✏️

  • Change Blog Topic Dynamically: Modify the Set Blog Topic node’s “topic” parameter to another subject or link it to an external RSS or Google Sheet for automation.
  • Tweak AI Rewriting Prompts: In the Rewrite for Grade X Reading Level nodes, adjust the prompt text to change tone, humor level, or complexity for a custom audience.
  • Adjust WordPress Post Status: Change the Create WordPress Post node’s “status” field from “draft” to “publish” to auto-publish posts, or implement a review delay node before publishing.
  • Customize Featured Image Prompt: In the pollinations.ai HTTP Request node, adjust the prompt parameters or replace the API with your own image generation service.
  • Add Additional Notifications: Use the Telegram nodes to send updates for each major workflow stage (e.g., content generation complete).

Troubleshooting 🔧

  • Problem: “Error processing content: Missing title in output”
    Cause: AI did not return a title.
    Solution: Check AI prompt in Create Structured Blog Post node; ensure the prompt asks explicitly for a title field.
  • Problem: WordPress posts not created
    Cause: Invalid WordPress credentials or API endpoint.
    Solution: Verify WordPress API credentials under n8n credentials; confirm URL endpoints and permissions.
  • Problem: Featured image not set
    Cause: Upload or set-image API calls failed.
    Solution: Check WordPress media upload and post update HTTP nodes; ensure authentication headers are correct.
  • Problem: Telegram notifications not sent
    Cause: Invalid Telegram bot token or chat ID.
    Solution: Verify credentials in Telegram nodes; test sending messages separately in n8n.
  • Problem: Google Drive backup fails
    Cause: Insufficient permissions or wrong folder selected.
    Solution: Confirm Google Drive API setup and folder ID; try uploading a test file manually.

Pre-Production Checklist ✅

  • Ensure OpenAI API key is valid and has sufficient quota.
  • Verify WordPress API credentials with appropriate permissions.
  • Test Google Drive node permissions and folder access.
  • Confirm Telegram bot and chat ID are correct.
  • Run test with a sample topic; verify all reading level outputs are generated.
  • Inspect WordPress draft creation and confirm post status.
  • Check that featured image uploads and sets correctly.
  • Validate Telegram notifications firing on success and error conditions.

Deployment Guide

Once setup is validated, activate the workflow in n8n and rely on the manual trigger or integrate it with other triggers such as webhooks or schedules. Monitor executions via the n8n dashboard logs for any errors or delays. Adjust retry settings for nodes where possible to handle transient failures.

Because this workflow includes asynchronous HTTP interactions with external services, consider adding monitoring alerts for API rate limits or failures.

FAQs

  • Can I use other AI models instead of OpenAI GPT-4o?
    Yes, the workflow nodes targeting AI generation and rewriting rely on OpenAI API for now, but similar models supporting OpenAI API can be swapped in with some configuration.
  • Does this use a lot of API credits?
    Each content creation and rewrite call consumes OpenAI API credits. Monitor usage to optimize.
  • Is my content securely stored?
    Original drafts are saved in your Google Drive account. WordPress posting uses your credentials securely via OAuth.
  • Can this handle high volume blogging?
    The workflow is designed for individual or moderate volume. For scaling, consider queueing content topics or batch processing.

Conclusion

By following this automation guide, you have transformed a tedious, multi-step blog creation process into a seamless AI-powered pipeline. You now can generate high-quality WordPress drafts tailored for multiple reading levels, complete with engaging featured images—all automated within n8n.

This workflow saves hours per post and ensures content consistency and accessibility for broad audiences. Next, consider extending it by automating social media postings, adding SEO metadata, or integrating user feedback collection.

With this setup, you’re well-equipped to scale your blogging efforts efficiently and effectively.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free