SEO Content Creation and Optimization for WordPress - n8n Workflow

Automate SEO-friendly blog posts using AI (DeepSeek/Gemini) and n8n. This powerful n8n workflow generates content, titles, images, and Yoast meta tags from a Google Sheet prompt.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content agencies and marketing teams needing to scale blog output quickly.

  • SEO professionals looking to automate on-page optimization steps.

  • Blog owners and webmasters managing high-volume content.

  • Users seeking advanced n8n templates for integrating multiple AI models (DeepSeek, Gemini, DALL-E) and platforms.

Overview

This comprehensive n8n workflow provides an end-to-end solution for high-volume content creation, ensuring every post is SEO-ready before publication. The automation begins with a simple topic prompt defined in a Google Sheet, turning your editorial calendar into an execution machine. The n8n workflow leverages powerful AI models (DeepSeek) to generate structured, HTML-formatted articles and optimized titles. It handles the full asset pipeline, including generating a realistic featured image and uploading it to WordPress. Finally, the automation uses a sophisticated LangChain n8n node setup—powered by OpenRouter's Gemini model—acting as an 'SEO expert' to craft highly specific meta titles and descriptions, applying them directly to the post's Yoast metadata fields via the WordPress API. This n8n template drastically reduces the manual labor associated with content planning and optimization, making it an indispensable tool for content creators.

How it Works

The entire process is orchestrated through a chain of connected n8n node operations:


  1. Trigger and Input: The n8n trigger (currently manual for testing) initiates the process. The Get context Google Sheets n8n node retrieves the PROMPT (the article topic) from the designated sheet row based on an ID.

  2. Article Generation: The Generate article n8n node uses DeepSeek to write an SEO-friendly article in HTML format, following strict length and structure guidelines (intro, 2-3 chapters, conclusion).

  3. Title Creation: The Generate title n8n node analyzes the new content and generates a short, SEO-optimized title.

  4. Drafting: The Add draft to WP WordPress n8n node creates a new post draft using the generated title and article body.

  5. Image Handling: The flow branches to generate a realistic featured image using OpenAI (DALL-E). This image is then uploaded to WordPress using the Upload image HTTP Request n8n node, and subsequently attached to the post using the Set image n8n node.

  6. Tracking Update: The Update Sheet n8n node records the initial post details (URL, ID, Date) back into the Google Sheet.

  7. SEO Optimization: The SEO Expert LangChain n8n node uses a robust prompt definition and the OpenRouter/Gemini model to analyze the article content and generate highly compliant metatitle and metadescription tags, validated by the Structured Output Parser.

  8. Final Update: The Set metatag HTTP Request n8n node updates the WordPress post's metadata fields (specifically Yoast SEO fields) with the optimized tags. The final Finish work Google Sheets n8n node updates the original sheet row with the finalized metadata, completing the n8n workflow execution.

Installation Guide


  1. Download the n8n template: Copy the provided JSON code.

  2. Import into n8n: In your n8n interface, go to 'Workflows', click 'New', then 'Import from JSON' and paste the code.

  3. Set up Credentials: You will need to configure the following credentials for this n8n workflow:

Google Sheets OAuth2 API: For accessing the source sheet.
DeepSeek/OpenAI API Keys: For content and title generation (DeepSeek) and image generation (OpenAI).
OpenRouter API Key: For the advanced SEO analysis using the Gemini model.
WordPress API (or HTTP Basic Auth): For connecting to your WordPress site and performing read/write operations.

  1. Configure Google Sheet: Clone the sample sheet mentioned in the sticky note and update the 'Document ID' in the two Google Sheets n8n node steps (Get context, Update Sheet, Finish work).

  2. Configure WordPress URLs: Update the URL parameters in the Upload image, Set image, and Set metatag HTTP Request n8n node steps to match your WordPress domain.

Node Details

When clicking ‘Test workflow’ (Manual Trigger): The starting n8n trigger for testing the automation logic.
Google Sheets (Get context, Update Sheet, Finish work): Reads the article PROMPT and writes back all generated metadata (URL, Title, Post ID, Metatitle, Metadescription) using rownumber as the matching column for updates.
OpenAi (Generate article, Generate title): Utilizes a DeepSeek credential to generate structured content and an SEO title, adhering to strict length and formatting rules.
WordPress (Add draft to WP): The core publishing n8n node, creating the initial draft post with the generated content.
OpenAi (Generate image): Used to generate a realistic 1024x1024 featured image based on the article title.
HTTP Request (Upload image, Set image, Set metatag): These n8n node steps use the WordPress REST API to handle crucial tasks: uploading the binary image data, setting the featured media ID, and applying the Yoast SEO meta fields (
yoastwpseotitle, yoastwpseo_metadesc) via a PUT request.


  • SEO Expert (Chain LLM n8n node): A powerful LangChain component that defines the persona of an expert SEO content optimizer. It relies on the OpenRouter Chat Model and the Structured Output Parser to deliver guaranteed, compliant JSON output for the meta tags. This demonstrates an advanced use case within n8n.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at [email protected] or add me on Linkedin.com/in/davideboizza

Featured*