n8n

How to Generate WordPress Content Drafts?

Create on brand blog drafts in minutes. The automation reads your recent posts, learns the structure and voice, and writes a new article. It then saves a draft in your site for review.

The flow starts on a manual run and fetches your blog homepage with an HTTP request. It uses an HTML parser to collect article links, limits to the latest five, and loads each post. Article bodies are extracted and converted to Markdown to reduce tokens while keeping headings and lists. The combined text feeds two AI steps. One captures layout and writing style. The other extracts voice traits with examples. These guidelines are merged and passed to a final AI writer with your topic prompt. The result is a complete draft that the WordPress node saves with a title, slug, and content.

Setup only needs your site URL, CSS selectors for links and article content, and credentials for OpenAI and WordPress. Expect first draft time to drop from hours to minutes while keeping tone consistent. Great for marketing teams and agencies that need steady, on brand content without heavy copy pasting or manual formatting.

What are the key features?

  • Fetches your blog homepage and finds recent article links with CSS selectors.
  • Limits the number of source posts to the latest five for focused analysis.
  • Extracts article body HTML and converts it to Markdown to preserve structure.
  • Combines multiple posts into one dataset for stronger style detection.
  • Analyzes article layout and writing style with an LLM chain.
  • Extracts brand voice characteristics and examples with an AI information extractor.
  • Merges style and voice guidelines to guide the final AI writer.
  • Generates a new article from your prompt and saves it as a WordPress draft with title and slug.

What are the benefits?

  • Reduce first draft time from 3 hours to 15 minutes
  • Automate up to 80 percent of initial writing while keeping brand voice
  • Improve tone consistency across posts by using shared style and voice guides
  • Cut copy paste work by extracting and cleaning source content automatically
  • Publish faster by pushing drafts straight to WordPress for review

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with OpenAI and WordPress. See the Tools Required section above for links to create accounts with these services.
  3. Open the OpenAI Chat Model nodes and create a new OpenAI credential. When prompted, paste your API key from the OpenAI account API page, name the credential clearly, and save.
  4. Open the WordPress node and create a new WordPress credential. If unsure, choose Create new credential and follow the on screen steps. Use your site URL and a user with permission to create posts. Application Passwords are commonly used for secure access.
  5. In the Get Blog node, replace the URL with your site homepage.
  6. In the Extract Article URLs node, update the CSS selector to match your theme for article links. Test the node and confirm it returns a list of links.
  7. In the Limit node, set how many recent posts you want to analyze, such as 3 to 5 based on your token limits.
  8. In the Extract Article Content node, set the CSS selector to the main article body element on your site. Run a test and confirm the node outputs the full content.
  9. Review the Markdown node output to ensure headings and lists look correct. If the text is too long, reduce the number of source posts.
  10. Open the New Article Instruction node and write your prompt or topic. Keep it clear and specific.
  11. Select your model in the OpenAI nodes and verify the max tokens fit your expected article length.
  12. Click Test workflow to run. Watch the execution. Confirm that article links are found, content is extracted, and a draft is created.
  13. Check your WordPress admin Posts list for the new draft. Review the title, slug, and body, then edit as needed.
  14. Troubleshoot: If no links are found, adjust the link selector. If drafts do not save, check WordPress credentials and site URL. If token errors occur, shorten source text or lower the number of posts.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

WordPress

Sign up

Free plan: $0 / mo (WordPress.com REST API supports creating posts)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.