Auto-Blogging System using AI Content Generation and WordPress Publishing - n8n Workflow

Use this powerful n8n workflow to automate content generation. Scrape Reddit RSS, use Groq AI to draft articles, find Pexels images, and auto-publish to WordPress.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content marketers needing high-volume blog content.

  • SEO specialists looking to rapidly populate niche WordPress sites.

  • n8n users interested in advanced AI content pipelines.

  • Blog owners seeking autonomous, topic-driven publishing solutions.

Overview

This comprehensive solution addresses the challenge of high-volume, contextual content creation. It initiates an automated process every time a new article appears in relevant subreddits (r/artificial, r/MachineLearning, etc.). The heart of this n8n workflow is the Groq AI integration, which transforms short or complex Reddit posts into engaging, human-friendly blog articles, complete with structural elements like titles, categories, and tags. Furthermore, this n8n template manages the entire media lifecycle: finding a relevant image via Pexels, uploading it to WordPress, setting metadata, and finally publishing the post. This complete hands-off publishing cycle demonstrates the power of a modern n8n node combination for scaling content operations.

How it Works

The entire process is orchestrated by a powerful combination of standard and specialized n8n node types:


  1. Trigger Event: The n8n trigger starts by monitoring three separate Reddit RSS Feed Trigger nodes for new posts related to AI and Machine Learning.

  2. AI Generation: The merged Reddit data is passed to the Groq Chat Model (via LangChain). The model uses a highly specific system prompt to craft a friendly, well-structured blog post, returning the output as a JSON object containing the title, content, category, four tags, and a Pexels image search keyword.

  3. Data Structuring: The Structured Output Parser n8n node ensures the AI output is correctly mapped for subsequent processing steps.

  4. Media Acquisition: A Pexels HTTP Request image node uses the AI-generated keyword to find a relevant stock photo. An If node handles cases where no image is returned, defaulting to a generic "ai" search to ensure every post has media.

  5. Taxonomy Management: The most complex section of this n8n workflow involves handling WordPress categories and tags. For the required category and each of the four tags, a combination of HTTP Request, Switch, Filter, and Merge n8n node steps attempts to create the taxonomy term. If creation fails (indicating existence), the flow redirects to search for the existing term's ID. This guarantees the correct WordPress IDs are captured for every item.

  6. Post Creation: The Create a post WordPress n8n node creates the post in draft status, using all consolidated data (title, content, and the five taxonomy IDs).

  7. Featured Image Setup: After generating a clean slug using a Code n8n node, the Pexel Image Download HTTP Request fetches the binary data. This image is then uploaded to WordPress using another HTTP Request, and its alt text/description are set.

  8. Final Publish: The workflow sets the post's featured media using the WordPress Media ID, and finally, the Update a post WordPress n8n node changes the post status to "publish".

Installation Guide

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


  1. Import Workflow: Copy the provided n8n workflow JSON code and import it directly into your n8n instance using the 'Import from JSON' function.

  2. WordPress API Credentials: Configure a new WordPress API credential pointing to your WordPress site. This credential is vital for creating posts, categories, tags, and uploading media. Attach this credential to all relevant WordPress HTTP Request nodes (e.g., WP Make Category) and the dedicated WordPress n8n node instances (Create a post, Update a post).

  3. Groq API Credentials: Set up and attach your Groq API credential to the Groq Chat Model n8n node to enable content generation.

  4. Pexels API Credentials: Configure a Generic HTTP Header Auth credential for Pexels. Use a Pexels API key, setting the header name as Authorization and the value as your key. Attach this to the Pexels HTTP Request image n8n node instances.

  5. Review Triggers: Ensure the Reddit RSS Feed Trigger nodes are configured with the correct feed URLs you wish to monitor.

  6. Activate: Save the n8n workflow and set the active toggle to true. The n8n trigger will begin polling the feeds on the defined schedule.

Node Details

RSS Feed Trigger: Serves as the primary n8n trigger, initiating the process upon detection of new RSS items from selected Reddit subreddits.
Triggers Merge (Merge Node): Combines data streams from the multiple RSS n8n trigger inputs into a single item list for the next step.
Groq Chat Model (LangChain n8n node): Utilizes the powerful llama3-70b-8192 model to transform the raw Reddit data into structured, human-written blog content (title, body, taxonomy, image keyword).
Structured Output Parser (LangChain n8n node): Essential for handling the AI's JSON response, ensuring all generated elements are correctly mapped into subsequent n8n node variables.
Pexels HTTP Request image (HTTP Request Node): Executes a search against the Pexels API using the keyword provided by the AI to find a suitable featured image. The n8n workflow includes fallback logic if the initial search fails.
WP Make Category / WP Make Tag (HTTP Request Node): These n8n node calls attempt to create the category/tag in WordPress. The critical configuration onError: continueRegularOutput allows the flow to proceed to the search phase if the term already exists.
Category ID / Tag ID (Set Nodes): Used extensively throughout the middle of the n8n workflow to capture and retain the unique integer IDs returned by WordPress for the created or located taxonomy terms.
Create a post (WordPress Node): A dedicated WordPress n8n node that combines the AI-generated content with the acquired Category and Tag IDs to create a post in draft status.
Image Upload To Wordpress (HTTP Request Node): Handles the final stage of media upload, sending the downloaded image binary data to the WordPress media endpoint to prepare it as the featured image.
Update a post (WordPress Node): The final n8n node in the flow, updating the post's status from 'draft' to 'publish' once all content and media linkages are complete.

Related n8n Workflows

Free

Nodes: 13 Nodes
Updated: December 26 2025
View all
Created by
Ranjan Kumar
Ranjan Kumar

Hey, I’m Ranjan Kumar — I build smart, AI-powered workflows with n8n to automate tasks, save time, and simplify daily work. I enjoy combining tools like Groq, OpenAI, WordPress, etc. to create powerful no-code/low-code automations. Whether it’s content creation or API integration, I focus on making workflows that are easy to use, practical, and ready to plug into your stack. Sharing real-world automations to help others work smarter, not harder.

Featured*