Automate On-Brand Blog Article Creation with n8n and OpenAI

Struggling to maintain consistent brand voice across your blog? This n8n workflow uses OpenAI to analyze your existing articles and generate new, on-brand article drafts automatically, saving hours of manual editing and ensuring brand consistency.
manualTrigger
httpRequest
lmChatOpenAi
+9
Workflow Identifier: 1252
NODES in Use: Manual Trigger, HTTP Request, HTML Extract, Split Out, Limit, Markdown, Aggregate, OpenAI Chat Model, Information Extractor, Merge, Set, WordPress

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 Sarah, a content manager at a fast-growing tech startup. Every week, Sarah spends countless hours crafting blog articles that reflect her company’s unique brand voice. Despite her efforts, inconsistencies creep in—tone shifts, structural changes, and language variations confuse readers and dilute brand identity. On top of that, juggling research, writing, and editing kills her productivity, leading to missed deadlines and lost opportunities to engage her audience.

This scenario is all too familiar for many businesses striving to maintain a consistent and professional blog presence. The pain is real: hours wasted manually analyzing past content, the risk of off-brand messaging, and the constant pressure to produce fresh, engaging articles fast.

What if Sarah could automate the process of understanding her brand’s existing voice and style, letting AI generate new drafts that are instantly on-brand? Let’s dive into a unique workflow specifically designed to solve this problem using n8n and OpenAI.

What This Automation Does ⚙️

This n8n workflow automates the creation of new blog article drafts that mirror your brand’s existing writing style and voice by analyzing previously published content. Here’s exactly what happens when you run it:

  • Automatically fetches the latest five blog articles from your corporate blog using HTTP request nodes.
  • Extracts and converts the raw HTML content of articles into Markdown format, optimizing it for AI processing.
  • Uses OpenAI-powered nodes to analyze the article structure, layout, language, and writing styles across all fetched articles.
  • Extracts distinct brand voice characteristics like tone, style, and language choices along with descriptions and examples.
  • Combines the gathered article structure and brand voice insights to guide AI in generating a new, on-brand blog article draft based on your instructions.
  • Saves the AI-generated draft straight into WordPress as a review-ready post, streamlining your content creation pipeline.

Benefits include saving hours weekly on manual content review, achieving consistent brand messaging, and rapidly producing multiple article drafts for marketing teams.

Prerequisites ⚙️

  • n8n account with access to workflow creation.
  • OpenAI API credentials for language model nodes (AI-powered content analysis and generation).
  • WordPress account credentials with API access to save draft posts.
  • Access to your corporate blog’s public website (HTML content retrievable via URL).

Step-by-Step Guide to Build This Workflow ✏️

Step 1: Trigger Workflow Manually

Navigate to your n8n dashboard and add a Manual Trigger node labeled “When clicking ‘Test workflow’”. This lets you run the entire workflow on demand for testing or scheduled use.

You should see a button to manually trigger the flow in the editor. No parameters are needed here.

Step 2: Fetch Your Blog Homepage

Add an HTTP Request node named “Get Blog” configured with the URL of your blog’s homepage (e.g., https://blog.n8n.io). This node fetches the blog’s HTML for link extraction.

Use a GET request; no headers or authentication needed if your blog is public.

Common mistake: Ensure the URL is reachable and returns valid HTML content.

Step 3: Extract Article URLs from Homepage

Add an HTML Extract node called “Extract Article URLs” that parses the homepage content to extract article URLs. Use the CSS selector “.item.post a.global-link” to find article links.

Set the extraction to return the ‘href’ attribute as an array under the key ‘article’.

This prepares the list of URLs for further processing.

Step 4: Split URLs into Individual Items

Use a Split Out node named “Split Out URLs” to separate each article URL into its own workflow item. This enables processing articles one by one downstream.

Field to split out: ‘article’.

Step 5: Limit Articles to the Latest Five

Insert a Limit node named “Latest Articles” limiting the split URLs to 5 entries. This controls workflow processing to your most recent content.

Common mistake: Omitting this node leads to processing all articles, which might be excessive and slow.

Step 6: Fetch Each Article’s Full Content

Connect a second HTTP Request node called “Get Article”. Set URL to =https://blog.n8n.io{{ $json.article }} to retrieve each article page HTML.

Each run gets the article HTML body.

Step 7: Extract Article Body HTML

Use another HTML Extract node named “Extract Article Content” targeting the CSS selector “.post-section” to isolate the main article content in HTML format.

Step 8: Convert Extracted HTML to Markdown

Add a Markdown node called “Markdown” to convert HTML article contents into Markdown format, which is more token-efficient and LLM-friendly.

Step 9: Aggregate Articles Into a Single Dataset

Use an Aggregate node named “Combine Articles” merging all Markdown articles into a single array for batch AI analysis.

Step 10: Analyze Article Structure with OpenAI

Attach an OpenAI Chat Model node named “Capture Existing Article Structure” that submits all combined articles to OpenAI. It prompts the model to describe common structures, layouts, and writing styles across your blog.

This high-level analysis forms a structural guideline for new content generation.

Step 11: Extract Brand Voice Characteristics

Use the Information Extractor node called “Extract Voice Characteristics” to parse the articles further and identify brand voice traits, such as tone, descriptive style, and language examples.

Step 12: Combine Structure and Voice Data

Merge the responses from steps 10 and 11 with a Merge node named “Article Style & Brand Voice”. This combines the structural and voice insights as input for final content creation.

Step 13: Define New Article Instructions

Add a Set node labeled “New Article Instruction”. Here enter your prompt instructions for the AI, e.g., ‘Write a comprehensive guide on using AI for document classification and document extraction…’. This is the creative brief for the next article.

Step 14: Generate New Article Content with AI

Use another Information Extractor node called “Content Generation Agent” that takes the article style, voice characteristics, and instructions to produce a fresh blog article draft in Markdown format.

Step 15: Save Generated Draft to WordPress

Finally, add a WordPress node called “Save as Draft”. Configure it to use your WordPress credentials and create a draft post with the AI-generated title, slug, and content.

This final step automates draft creation for your editorial team to review and publish.

Customizations ✏️

  • Change Source Blog: Modify the “Get Blog” HTTP Request URL to fetch articles from your own company blog or any public blog with an accessible HTML structure.
  • Adjust Number of Articles: Change the “Latest Articles” Limit node maxItems parameter to fetch more or fewer posts for broader or narrower style sampling.
  • Modify Article Instruction: In the “New Article Instruction” Set node, customize the AI prompt to target specific topics or formats relevant to your brand’s content goals.
  • Use Other Content Sources: Adapt the workflow to accept other text sources such as PDFs or social media posts by replacing HTTP nodes with appropriate file reading nodes, provided text extraction is possible.
  • Publish Automatically: Change the WordPress node’s post status from “draft” to “publish” for instant live posting after AI generation (useful for fully automated blogs).

Troubleshooting 🔧

  • Problem: “No article URLs extracted in the HTML node.”
    Cause: Incorrect CSS selector or website structure changes.
    Solution: Inspect your blog HTML and update the CSS selector in “Extract Article URLs” accordingly.
  • Problem: “OpenAI API rate limits or errors.”
    Cause: Exceeding free or paid API quota.
    Solution: Monitor usage on OpenAI dashboard, reduce prompt size, or request higher quotas.
  • Problem: “Markdown node output is empty or malformed.”
    Cause: HTML input incomplete or incorrect CSS selector in previous HTML extraction.
    Solution: Verify the HTML input to the Markdown node and adjust extraction selectors.
  • Problem: “WordPress node fails authentication or post creation.”
    Cause: Invalid credentials or WordPress REST API disabled.
    Solution: Check WordPress API keys and ensure the REST API is enabled on your site.

Pre-Production Checklist ✅

  • Verify OpenAI API credential setup in n8n’s credential manager.
  • Test HTTP nodes with your blog URLs to confirm content retrieval.
  • Ensure CSS selectors in HTML nodes match your blog’s HTML structure.
  • Run the workflow manually and inspect each node output for data completeness.
  • Backup WordPress site or work in a staging environment before auto-posting drafts.

Deployment Guide

Activate your workflow in n8n once fully tested. You can trigger it manually or configure a schedule node for regular runs (e.g., weekly content refresh). Monitor logs for errors in n8n’s execution monitor.

Encourage editorial review of AI-generated drafts saved as WordPress posts before publishing to maintain high content quality.

FAQs

  • Q: Can I use other AI providers besides OpenAI?
    A: This workflow is built for OpenAI’s API, but n8n supports integration with other LLM providers if you adapt the language model nodes.
  • Q: Does this workflow consume many API credits?
    A: Yes, analysis and content generation require multiple calls; monitor and manage API quotas accordingly.
  • Q: Is the content data and API communication secure?
    A: Data is transmitted over HTTPS, but consider compliance policies and store sensitive credentials securely.
  • Q: Can this handle high volumes of articles?
    A: The workflow is optimized for batches of 5 articles; scaling requires workflow adjustments to handle large datasets efficiently.

Conclusion

By following this detailed n8n workflow, you’ve automated the challenging process of analyzing and replicating your brand’s voice through AI-powered blog draft creation. This saves significant time weekly, ensures consistent messaging, and speeds up marketing content production.

Next, consider extending this workflow to social media post generation, content translation, or multi-language support using the same brand voice principles.

With a bit of setup and customization, you’re now equipped to build a smart, scalable content pipeline that grows with your brand—faster and better than manual writing alone.

Happy automating!

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