How to Use n8n with ._Template 155 Seo Brief Generator Concorrentes

SEO briefs are the bottleneck between "we should rank for this" and a writer actually producing content. Someone has to pull the top-ranking pages, extract their headings, count word length, list the

How to Use n8n with ._Template 155 Seo Brief Generator Concorrentes

SEO briefs are the bottleneck between "we should rank for this" and a writer actually producing content. Someone has to pull the top-ranking pages, extract their headings, count word length, list the entities Google expects, and turn it into a document a writer can execute against. Done by hand, one brief is 30–60 minutes of tab-switching. Ten briefs a week is a part-time job nobody wants. This article shows how to turn that job into an n8n workflow that produces a competitor-informed SEO brief from a single keyword input.

The problem: briefs don't scale, and inconsistent briefs produce inconsistent content

Manual SEO briefs fail on three axes. First, time: gathering SERP data, opening five competitor URLs, and scraping their structure is pure mechanical labor. Second, consistency: two team members write two different brief formats, so writers get different signals for the same content standard. Third, completeness: under time pressure, the person building the brief skips the tedious parts — entity coverage, People Also Ask questions, average content length — which are exactly the parts that correlate with ranking.

The result is content that's written against vibes instead of against what actually ranks. You need a system that ingests a target keyword, looks at who currently wins the SERP, extracts what those pages have in common, and outputs a structured brief every single time without a human babysitting it. That's an orchestration problem, which is precisely what n8n is built for.

The solution: a keyword-to-brief pipeline in n8n

The workflow follows one linear path with a fan-out for competitor scraping. Conceptually: a keyword enters, you fetch the live SERP, you take the top 5–10 organic results, you scrape each one for headings and word count, you aggregate that into signals (recommended length, common H2s, shared entities, questions to answer), and you push the finished brief to Google Docs, Notion, or a database.

The node chain looks like this:

  • Webhook or Form Trigger — accepts the target keyword and optional secondary keywords.
  • HTTP Request — calls a SERP API (SerpApi, DataForSEO, or Serper) to get the top organic URLs for the keyword.
  • Item Lists / Split Out — turns the array of results into individual items so each competitor URL is processed separately.
  • HTTP Request (inside a loop) — fetches the raw HTML of each competitor page.
  • HTML Extract — pulls h1, h2, h3, and body text from each page.
  • Code node — computes word counts, deduplicates headings, and tallies entity/keyword frequency across all competitors.
  • AI Agent / OpenAI / Anthropic node — synthesizes the aggregated signals into a written brief.
  • Google Docs / Notion / Postgres — stores the finished brief.

Because n8n handles the retries, rate-limiting, and iteration natively, you never write glue code to hold this together — you configure nodes.

Step-by-step setup

1. Trigger. Add a Form Trigger node with two fields: keyword (required) and secondary_keywords (optional, comma-separated). This gives you a shareable URL your team can submit briefs from without touching n8n.

2. Pull the SERP. Add an HTTP Request node. Set method to GET, URL to your SERP provider's endpoint (e.g. https://google.serper.dev/search), and pass the keyword via {{ $json.keyword }} in the query or body. Store the API key in n8n Credentials as a header-auth credential — never hardcode it in the node. Enable Retry On Fail with 3 attempts and a 5-second wait, because SERP APIs occasionally throttle.

3. Isolate the top results. Add a Split Out node (or the newer Edit Fields + Loop Over Items pattern) pointed at the organic array. Add a Limit node set to 5–10 items so you only scrape the pages that actually define the ranking bar.

4. Scrape each competitor. Inside a Loop Over Items node, add an HTTP Request fetching {{ $json.link }}. Set a realistic User-Agent header and a timeout of 15000ms. Follow it with an HTML Extract node: create extraction values for h1, h2, h3 (return array = true) and one for the main content selector (article or main) to compute length. Turn on Continue On Fail here — some pages will block bots, and you want the workflow to keep going with the pages that succeeded rather than dying on one 403.

5. Aggregate the signals. After the loop, add a Code node in JavaScript. Iterate over all items to: compute the average and max word count (your recommended length target), flatten and count every H2/H3 to find headings that appear on 2+ competitors, and run a simple frequency count on the body text to surface recurring entities and phrases. Return one consolidated JSON object with recommended_word_count, common_headings, frequent_entities, and competitor_urls.

6. Generate the brief. Add an AI Agent or model node (Anthropic Claude or OpenAI). Feed it the aggregated object in the prompt: "Using these competitor signals, produce an SEO content brief for the keyword {{ $json.keyword }}." Instruct it to output a title suggestion, meta description, recommended word count, a full H2/H3 outline that covers the common headings plus gaps competitors missed, an entity checklist, and internal-linking suggestions. Set temperature low (0.2–0.4) so the structure stays consistent across briefs.

7. Deliver. Add a Google Docs node (Create document) or a Notion node (Create page) and map the AI output into the body. Optionally add a Postgres or Airtable node to log every brief with its keyword and creation date, so you build a searchable brief archive over time.

Benefits: what this actually buys you

The obvious win is time — a 45-minute manual task collapses to a 60-second run. But the compounding wins matter more. Consistency: every brief follows the same structure, so writers get identical signals and your content quality bar stops depending on who built the brief. Competitor grounding: because length, headings, and entities are derived from pages that already rank, your briefs target the real bar instead of a guess. Volume: you can batch-run 50 keywords by swapping the Form Trigger for a Schedule Trigger that reads keywords from a Google Sheet, turning brief creation into an overnight background job. And because the whole thing lives in n8n, ops owns it — no engineer needed to add a step, swap the SERP provider, or change the output format.

Common pitfalls (and how to avoid them)

Scraping gets blocked. Many high-ranking sites block datacenter IPs. Set a real User-Agent, keep Continue On Fail on, and consider routing the fetch HTTP Request through a scraping proxy for the pages that 403. Losing one or two competitors is fine; your aggregation should tolerate partial data.

Rate limits from the SERP API. Batch runs will hit provider limits fast. Add a Wait node inside the loop (1–2 seconds) and configure Retry On Fail with exponential backoff. Cache SERP results in a database keyed by keyword so re-running a keyword within a day doesn't burn another API call.

The Code node breaks on missing fields. Competitor pages are inconsistent — some have no article tag, some return empty heading arrays. Guard every access with defaults (const headings = $json.h2 || []) or the whole run fails on one malformed item.

The AI invents structure instead of following signals. If you give the model too much freedom, briefs drift. Pin the output with an explicit template in the prompt and low temperature, and pass the aggregated data as structured JSON rather than prose so the model has clean inputs to work from.

Credentials in plain nodes. Never paste API keys into an HTTP Request URL. Use n8n Credentials so keys are encrypted and reusable across nodes — and so you can rotate a provider without editing every node.

No idempotency on delivery. If the workflow errors after creating the Google Doc and you re-run it, you'll get duplicates. Log a brief ID before the delivery step and check for it on entry, or use the archive database as a dedup guard.

Once this is running, the marginal cost of a competitor-grounded SEO brief drops to near zero — which changes what your content strategy can afford to attempt.