Automated SEO Content Strategy and Generation Engine - n8n Workflow

Use this comprehensive n8n workflow to automate your entire content creation pipeline. It identifies trending keywords, scrapes competitor content, and generates fully SEO-optimized articles using Anthropic AI, storing the final output directly in Supabase. Find more advanced n8n templates here.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

SEO Strategists and Content Marketing Managers looking to scale content production.
Users needing sophisticated n8n templates that combine web scraping, AI, and structured data output.
SaaS companies aiming to integrate trend analysis (Google Trends) into their content planning.
n8n users who need a powerful example of an automated AI agent using Anthropic's Claude model.

Overview

Scaling high-quality SEO content requires identifying hot topics and understanding competitor coverage. This advanced n8n workflow solves this by merging crucial marketing tools into a single, efficient automation pipeline. It begins by fetching related queries via the Scrapeless n8n node, assessing market heat using Google Trends, and prioritizing topics using an AI Agent. Only high-priority topics proceed to the competitive research phase, where the workflow scrapes the top three search results for deep analysis. Finally, a 'Senior SEO content writer' AI Agent utilizes this trend data and competitor context to draft a complete, structured article, ready for publication. This end-to-end automation demonstrates the powerful capabilities of the n8n platform for complex business operations.

How it Works

This powerful n8n workflow operates in three distinct phases, ensuring a structured and data-driven approach to content creation.

Phase 1: Identify Hot Topics & Prioritize Keywords


  1. The n8n workflow starts with a Manual Trigger, initiating the process. A 'Set seed keywords' n8n node defines the initial topic (e.g., 'Project Management').

  2. The workflow uses the Google Trends Scrapeless n8n node to fetch related queries for the seed keyword.

  3. A Split Out n8n node separates these related queries, treating each as a potential article topic.

  4. For each topic, the Google Trends-Get heat data Scrapeless n8n node retrieves the timeline interest data.

  5. An AI Agent—powered by Anthropic's Claude model and constrained by a Structured Output Parser—analyzes the time-series data to assign a recommendedpriority (P0 to P3).

  6. The Code1 n8n node sorts the results by priority.

  7. The results are then saved to a Google Sheet via the Append or update row in sheet n8n node, creating a dynamic content calendar database.

Phase 2: Competitive Research & Content Extraction


  1. Simultaneously, the second branch starts by reading the prioritized topics from the Google Sheet using the Get row(s) in sheet n8n node.

  2. The Filter out topics with priority above P2 n8n node ensures only P0, P1, and P2 topics are processed for expensive scraping and generation.

  3. For a high-priority topic, the Google Search Scrapeless n8n node finds the current top results.

  4. A Filter TOP3 competitor links n8n node isolates the top three organic results.

  5. The Split Out2 n8n node iterates over these top links.

  6. The Crawl Scrapeless n8n node visits each link and extracts the full content as Markdown.

  7. An Aggregate n8n node combines the markdown content from the three top competitors into a single item, ready for the final AI step.

Phase 3: Article Generation and Storage


  1. The Senior SEO content writer n8n node (another LangChain AI Agent using Anthropic) is given the trend insight and the three full competitor articles. It writes a complete, structured, SEO-optimized article based on the provided context and strict JSON schema.

  2. A Code n8n node is essential here to clean the raw AI text output, ensuring only valid JSON is parsed and flattened.

  3. Finally, the Create a row n8n node inserts the finalized article (title, slug, metadescription, and structured body) into the Supabase database, completing the n8n workflow.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and import it into your n8n instance via the 'Workflows' > 'New' > 'Import from JSON' option.

  2. Scrapeless Credentials: This n8n workflow relies heavily on the Scrapeless n8n node for data retrieval. You must set up a Scrapeless API credential, ensuring it is linked to all four Scrapeless nodes (Google Trends, Google Trends-Get heat data, Google Search, Crawl).

  3. Anthropic Credentials: You need to create an Anthropic API credential to power the two AI Agent n8n nodes (AI Agent and Senior SEO content writer).

  4. Google Sheets Credentials: Set up Google Sheets OAuth2 credentials. Link the credentials to the Append or update row in sheet and Get row(s) in sheet nodes, ensuring the target Document ID and Sheet Name are correctly configured.

  5. Supabase Credentials: Configure your Supabase API credentials. Link them to the Create a row n8n node and verify that the tableId (seo_articles) and field mappings are correct.

  6. Initial Configuration: In the Set seed keywords n8n node, update the seedKeyword value to the initial broad topic you wish to analyze.

  7. Execution: Once all credentials are set up, execute the n8n workflow manually using the When clicking ‘Execute workflow’ n8n trigger to begin the automated content generation process.

Node Details

This complex n8n template utilizes several critical n8n nodes for data manipulation, AI interaction, and external service communication:

When clicking ‘Execute workflow’ (n8n trigger): Initiates the entire n8n workflow manually for testing and demonstration.
Set seed keywords (Set n8n node): Defines the starting point of the analysis, setting the initial search term for trend research.
Google Trends (Scrapeless n8n node): Connects to the Scrapeless service to find related search queries for the initial keyword, driving the subsequent steps of the n8n workflow.
AI Agent (Anthropic/LangChain n8n node): This n8n node acts as an SEO Strategist, analyzing trend data to assign a priority level (P0-P3) to each potential keyword.
Structured Output Parser (LangChain n8n node): Enforces that the output from the AI Agent is strictly a valid JSON object, which is crucial for downstream processing in the n8n workflow.
Append or update row in sheet (Google Sheets n8n node): Used as a temporary database to store and prioritize keywords based on AI analysis.
Filter out topics with priority above P2 (Filter n8n node): A core logic n8n node that selects only the most promising keywords (P0, P1, P2) for resource-intensive competitive scraping.
Google Search & Crawl (Scrapeless n8n nodes): These n8n nodes perform competitive analysis, first finding the top search results and then crawling the full text content of the top three competitors.
Aggregate (n8n node): Combines the competitor content into a single input item for the senior content writer AI.
Senior SEO content writer (Anthropic/LangChain n8n node): The primary generative AI component. It takes context, trends, and competitor content to write a full, structured SEO article in JSON format.
Code (n8n node): Performs critical post-processing by stripping markdown wrappers from the AI output and parsing the pure JSON structure, preparing it for the database.
Create a row (Supabase n8n node): The final action in this n8n workflow, persisting the generated, structured article content into a Supabase table.

Related n8n Workflows

Free

Nodes: 13 Nodes
Updated: December 26 2025
View all
Created by
scrapeless official
scrapeless official

Featured*