SEO Content Outline Generator Based on SERP Analysis - n8n Workflow

Automate content briefing with this powerful n8n workflow. Analyze top competitor SERP data, scrape article structures (H2/H3s), and use OpenAI to generate optimized SEO content outlines saved directly to Google Docs. Use this advanced n8n template today.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Ideal User Persona

SEO Specialists & Content Strategists: Seeking to scale competitor research and ensure content briefs are data-backed.
Content Marketing Teams: Needing to drastically reduce the manual time spent on initial topic scoping and outlining.
Writers and Bloggers: Who want superior starting documents to overcome writer's block and target high-ranking topics.
n8n Users: Looking for advanced n8n templates integrating multiple services like Apify, OpenAI, and Google Docs.

Overview

This is an expert-level n8n workflow designed to drastically accelerate the foundational stage of the content lifecycle: research and briefing. Instead of manually reviewing the top 10 search results, this automation handles the entire process. The workflow starts via a simple n8n trigger form, takes a target keyword, executes a targeted SERP analysis, deep-scrapes the structure (H2s and H3s) from relevant competitors, and aggregates this competitive data. The compiled data is then processed by an OpenAI n8n node, which intelligently synthesizes the information into a superior, optimized content brief. This comprehensive n8n template saves the final outline directly to Google Docs, ensuring consistency and immediate usability for content teams. Utilizing this n8n workflow provides a significant competitive edge in search engine optimization.

How it Works

The process begins when a user submits a keyword and optional audience details through the dedicated SEO Keyword Input Form n8n trigger.


  1. Configuration and Logging: The initial input is used to set key parameters (like fetching the top 10 results in the 'jp' region) using a Set n8n node. Concurrently, the keyword request is logged for tracking in a Google Sheets n8n node.

  2. SERP Analysis: An Apify n8n node (Google Search Scraper) executes the keyword search, retrieving the top results.

  3. Data Filtering: A Filter n8n node cleans the results, automatically removing non-article competitors such as Amazon product pages, YouTube videos, and PDFs, focusing the analysis strictly on written content.

  4. Deep Web Scraping: A second Apify n8n node (Cheerio Scraper) visits each filtered URL to scrape detailed structural elements, specifically extracting the Title, H1, H2, and H3 tags from the competitor articles.

  5. Data Aggregation: The Aggregate n8n node consolidates all the scraped headings and article metadata into a single JSON object.

  6. AI Structure Generation: This aggregated data is passed to the OpenAI n8n node (LangChain integration), which uses a prompt (not visible, but implied by the flow) to analyze the common, successful, and unique elements of the top competitors, generating a brand-new, optimized article outline.

  7. Final Output: The final step uses the Google Docs n8n node to create a titled document containing the AI-generated content outline, completing the automated research phase of this robust 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 directly into your self-hosted or cloud n8n instance using the 'New' -> 'Import from JSON' option.

  2. Configure Credentials: You will need to set up the following credentials:

OpenAI: Provide your API key for the 'AI Content Structure Analysis' n8n node.
Google Docs: Authenticate your Google Docs account to allow the workflow to create new documents.
Google Sheets: Authenticate your Google Sheets account and link the 'Store Form Responses' n8n node to your desired logging spreadsheet and sheet name.
Apify: Provide your Apify API key and ensure you have sufficient credits for running the Google Search Scraper and Cheerio Scraper actors, utilized by the Apify n8n node.

  1. Link Sheets ID: In the 'Store Form Responses' Google Sheets n8n node, replace the <PLACEHOLDERVALUEGoogle Sheets Document ID_> with the actual ID of your tracking sheet.

  2. Activate the Trigger: Ensure the 'SEO Keyword Input Form' n8n trigger is active. You can then use the provided form link to execute the n8n workflow.

Node Details

This advanced n8n workflow relies on several specialized n8n node types to achieve its goal:

SEO Keyword Input Form (n8n Trigger):
Function: Serves as the starting point, manually triggered by a user submitting a target keyword and optional target audience.
Key Configuration: A Form Trigger type, crucial for user interaction in this n8n template.

Google Search SERP (Apify n8n Node):
Function: Executes the SERP analysis by calling the apify/google-search-scraper actor.
Key Configuration: Dynamically uses the input keyword ($json.target_keyword) and configuration variables (maxResults, countryCode: 'jp').

Filter Non-Article URLs (Filter n8n Node):
Function: Cleans the search results by filtering out non-content link types (e.g., '.pdf', 'amazon.co.jp', 'youtube.com').
Key Configuration: Uses 'notContains' string operation for crucial quality control.

Scrape Article Headings (Apify n8n Node):
Function: Deeply scrapes the remaining competitor URLs using the apify/cheerio-scraper actor to extract Title, H1, H2, and H3 HTML tags, forming the basis of the competitive analysis.

AI Content Structure Analysis (OpenAI n8n Node):
Function: Takes the aggregated, structured data from the competitors and uses the OpenAI API (via the LangChain n8n node) to generate a unique, superior content outline based on best practices.

Create Google Doc (Google Docs n8n Node):
Function: Creates the final output document, titling it dynamically using the original target keyword.

Store Form Responses (Google Sheets n8n Node):
* Function: Logs the input keyword and request data for auditing and tracking, providing a clear record of when this n8n workflow was run.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by
MAMI YAMANE
MAMI YAMANE

Featured*