n8n + n8n: SEO Content Machine — Keyword to Published Article in Under 5 Minutes

You have a keyword. You need a 2,000-word article that ranks — researched, structured for SERP intent, and published. Today that means a writer, an editor, an SEO tool subscription, and a publishing s

n8n + n8n: SEO Content Machine — Keyword to Published Article in Under 5 Minutes

You have a keyword. You need a 2,000-word article that ranks — researched, structured for SERP intent, and published. Today that means a writer, an editor, an SEO tool subscription, and a publishing step. Cost: 3–6 hours and $50–150 per article, or a content agency retainer that scales linearly with volume. For a founder shipping product content, a SaaS team building a programmatic SEO layer, or an ops lead who needs 40 comparison pages by end of quarter, that math doesn't work. The bottleneck isn't ideas — it's the assembly line between a keyword and a live URL.

The real problem: content velocity, not content quality

Most teams can write one good article. What they can't do is write one hundred, consistently, on schedule, without the process collapsing. The failure points are always the same: research gets skipped under deadline, articles ignore what's actually ranking on page one, formatting drifts, and publishing becomes a manual copy-paste ritual that nobody wants to own. The result is inconsistent output and a content calendar that's always three weeks behind.

The insight most people miss is that article production is a pipeline, not a creative act. Keyword goes in, SERP data gets pulled, an outline is built from real ranking signals, prose is generated, and the result is pushed to a CMS. Every stage has a clear input and output. Anything with clear inputs and outputs can be automated — and that's exactly what n8n is built for.

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

The SEO Content Machine is a single n8n workflow that takes one input — a target keyword — and returns a published WordPress post. Under the hood it runs five stages in sequence: capture the keyword, analyze the live SERP, generate an SEO-structured article with Claude, format it as clean HTML, and publish via the WordPress REST API. Start to finish, it runs in under five minutes because the machine never gets tired, never skips research, and never forgets to add the meta description.

The reason this beats a generic "write me a blog post" prompt is the SERP-analysis step. Before a single word is written, the workflow reads what's already ranking for your keyword — the headings competitors use, the questions they answer, the word count Google is rewarding. The article is then built to match and beat that intent, not to guess at it. That's the difference between content that ranks and content that sits on page five.

Step-by-step: building the workflow

Here is the exact node structure. If you're building from scratch, this is the skeleton; the ready-made template ships with all of it pre-wired.

1. Trigger — Webhook or Schedule. Use a Webhook node to fire the pipeline on demand (POST a keyword from a form or spreadsheet), or a Schedule Trigger to pull the next keyword from a queue every morning. For a batch backlog, drive it with a Google Sheets node holding your keyword list and a Loop Over Items node so each row runs the full pipeline independently.

2. SERP analysis — HTTP Request. An HTTP Request node calls a SERP API (SerpApi, DataForSEO, or a scraping endpoint) with your keyword. Set the method to GET, pass the keyword as a query parameter, and store your API key in n8n Credentials rather than hardcoding it. Follow it with a Set or Code node to extract the top-10 titles, H2/H3 headings, and average word count into a clean object.

3. Article generation — Anthropic Chat node. Feed the SERP summary into the Anthropic (Claude) node — use a current model such as claude-sonnet-5 for the best cost-to-quality ratio at volume, or claude-opus-4-8 when you want maximum depth. Your system prompt should instruct the model to write a 2,000-word article that covers the intent gaps found in the SERP, uses proper heading hierarchy, and returns semantic HTML. Set max_tokens high enough (4,096+) so the article isn't truncated mid-section.

4. Formatting and metadata — Code node. A Code node cleans the output: strips stray markdown, validates that the HTML opens with a paragraph, and derives the title, slug, and a 155-character meta description from the content. This is also where you inject your internal links and CTA block so every article ships consistent.

5. Publish — WordPress node or HTTP Request. The native WordPress node authenticates via an Application Password and creates the post in one call — pass the title, the HTML into the content field, and set status to draft for review or publish to go live. Prefer the raw REST API? A single HTTP Request POST to /wp-json/wp/v2/posts with the same payload does the same job and lets you set categories, tags, and the Yoast/RankMath meta fields in the request body.

Wire an Error Trigger workflow alongside it so any failed run pings Slack or email instead of dying silently. That's the entire machine — five functional nodes and a safety net.

Why this changes your content operation

The obvious win is speed: five minutes versus five hours. But the compounding benefits are bigger. Consistency — every article gets the same research depth and structure, so quality stops depending on which day the writer had. Scale — running 50 keywords is the same effort as running one; you drop rows into a sheet and walk away. Cost — the marginal cost per article falls to a few cents of API spend plus your SERP quota, versus $50–150 for freelance work. Focus — your team stops writing first drafts and starts doing the high-leverage work: picking the right keywords, editing the top-performers, and building topic clusters. The machine handles the assembly line so humans handle strategy.

Common pitfalls (and how to avoid them)

Publishing straight to live. Don't set status to publish on day one. Run the pipeline into draft for the first week, spot-check the output, and only flip to auto-publish once you trust the prompt. A bad prompt at scale means a hundred bad articles.

Skipping the SERP step to save an API call. This is the whole point of the machine. Without real ranking data the model guesses at intent, and you're back to generic content that doesn't rank. Keep the analysis node.

Ignoring rate limits. When you loop 40 keywords, both the SERP API and the Anthropic API have per-minute limits. Add a Wait node inside the loop (10–20 seconds) or enable n8n's batch/interval settings so you don't get throttled or hit a 429 mid-batch.

Thin, duplicate output. If every article reads the same, your prompt is too rigid. Pass the specific SERP headings into each generation so the model adapts to each keyword's actual intent, and set a minimum word count check in the Code node that rejects anything under 1,200 words before it publishes.

Leaking credentials. Never paste API keys into HTTP nodes. Use n8n Credentials for the SERP key, the Anthropic key, and the WordPress Application Password — it keeps them encrypted and out of your workflow exports.

Get these five things right and you have a content engine that runs while you sleep: a keyword in a spreadsheet at midnight, a researched, ranking-ready article live on your site by morning.

SEO Content Machine — Keyword to Published Article in Under 5 Minutes
PRONTO PARA USAR

Ja construimos isso pra voce

Nao comece do zero. O SEO Content Machine — Keyword to Published Article in Under 5 Minutes e um workflow n8n pronto para instalar — conecta suas ferramentas em minutos, sem codigo.

Instalar por $59.0 →