π¬ Generate SEO content briefs from keywords with SerpAPI, OpenAI, Google Docs and Sheets
β‘ 53 views Β· π¬ Content Creation & Video
π‘ Pro Tip β HTTP Request scraping tends to break when sites update their markup. If youβre scraping a major platform, check if ScraperNode covers it β it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.
Description
Quick Overview
This workflow collects a keyword via an n8n form, pulls the top Google results using SerpApi, scrapes headings from competitor pages, and uses OpenAI to generate a structured SEO content brief, which it saves to Google Docs and logs to Google Sheets.
How it works
- Receives a keyword, target country, and search intent from an n8n form submission.
- Queries SerpApiβs Google Search API to fetch organic search results for the keyword and keeps the top 10 listings.
- Visits each competitor URL and extracts the page title plus H1/H2/H3 headings from the HTML.
- Aggregates the scraped competitor signals and stops if fewer than three competitor pages were successfully collected.
- Sends the competitor headings and the original inputs to OpenAI (GPT-4o) to generate a structured SEO content brief (titles, meta description, outline, keywords, gaps, and link ideas).
- Formats the brief as markdown, creates a new Google Doc, inserts the brief content, and appends the result to a Google Sheets tab for tracking.
Setup
- Add a SerpApi credential (query-string auth) and ensure your SerpApi plan allows Google search queries.
- Add an OpenAI API credential and confirm the workflow can access the GPT-4o model.
- Connect Google Docs and Google Sheets credentials with permission to create documents and append rows.
- Replace the Google Sheets spreadsheet URL/ID in the append step and ensure a sheet/tab named βBriefsβ exists (or update the target sheet name).
π Nodes Used
Google Sheets, HTTP Request, Google Docs, Basic LLM Chain, OpenAI Chat Model, Structured Output Parser
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File