workflows.fit
Back to n8n workflows
n8n templateFreeBy TakatoYamada

Generate SEO content briefs from keywords with SerpAPI, OpenAI, Google Docs and Sheets

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...

Data & StorageProductivityDevelopmentCore NodesMiscellaneousAILangchainSticky Note
Loading interactive preview...

Template notes

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 1. Receives a keyword, target country, and search intent from an n8n form submission. 2. Queries SerpApi’s Google Search API to fetch organic search results for the keyword and keeps the top 10 listings. 3. Visits each competitor URL and extracts the page title plus H1/H2/H3 headings from the HTML. 4. Aggregates the scraped competitor signals and stops if fewer than three competitor pages were successfully collected. 5. 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). 6. 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 1. Add a SerpApi credential (query-string auth) and ensure your SerpApi plan allows Google search queries. 2. Add an OpenAI API credential and confirm the workflow can access the GPT-4o model. 3. Connect Google Docs and Google Sheets credentials with permission to create documents and append rows. 4. 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).