Skip to content

Internal linking automation

An n8n + GPT system that finds internal-link opportunities across your sitemap and writes the link insertions back into the article – at scale.

What the internal linking automation does

Two parts working together. One part looks at your full content library and finds which articles should link to each other. The other part takes a target URL and an article, and writes the link insertions for you – anchor text, position, the whole thing. Both run from a Google Sheet, both push their output back to a sheet you can review before anyone touches WordPress.

If you've ever stared at a 200-post blog and thought "I should probably internally link these better," this is what gets that done without a week of manual work.

Why internal links never get done by hand

Internal links are one of the highest-leverage principles of SEO, and most teams never do them. The reason is boring: it's tedious.

To do internal linking well, someone has to read your full content library, hold it in their head, and then go article by article picking the 5 places it should link out. For a 100-post blog, that's 500+ link decisions. Nobody has time, so it doesn't happen.

You can pay for a one-off internal linking audit and get a spreadsheet of recommendations. Six months later, you've published 30 new articles, the spreadsheet is stale, and you're back to square one.

The other option is an AI internal linking tool sold as SaaS. Most work by pattern-matching keywords and inserting links wherever the phrase appears. The output reads like SEO spam from 2014.

This internal linking automation is the third path. It runs from your existing sitemap and your existing article URLs. It's GPT-driven, so the recommendations are contextual ("link to this article here because the reader is asking a question that the target article answers"), not phrase-matched. You can run it on every new post you publish, plus a refresh sweep over old posts every quarter.

A sitemap, an article URL and target pages

For the opportunity finder:

  • Your site's sitemap (paste it once, the workflow reads it from there)
  • A row per article you want to link outward from – the article URL + the row's status set to "Planned"

For the link inserter:

  • The article URL
  • 1 to 3 target link URLs you want to push into the article (the priority pages you want more internal links to – typically your highest-converting service pages or your top content cluster pillars)

That's it. Both run from the same Google Sheet, just different tabs.

Internal linking suggestions you review in a sheet

For each "Planned" article, the opportunity finder writes back a row with:

  • 5 candidate articles from your sitemap that should link to this one
  • For each candidate, a short note on why (the topic overlap or reader-journey logic)
  • A status flip to "Reviewed" so you can filter

For the link inserter, you get a sheet row with:

  • 5 suggested insertion points per target URL (so up to 15 per article if you have 3 targets)
  • Each insertion: the exact 3-5 word anchor text + the surrounding sentence + the section it lives in
  • All insertions are placed after the first 600 words. That's my house rule rather than a law: it keeps the intro free of exits, so the reader reaches the argument before being offered a detour

You review the suggestions, accept the good ones, paste into WordPress. Or, if you want it fully automatic, the system can push approved insertions directly via the WP REST API (I'll wire that for you if you want it).

Thirty seconds to find, a minute to insert

Opportunity finder: about 30 seconds per article. You can batch 100 articles overnight.

Link inserter: about 1 minute per article (the GPT call takes a few seconds; the sheet write-back is the rest).

End-to-end for an existing 100-post blog: about 2 hours of compute time, plus 2-3 hours of human review on the output sheet.

Blogs big enough for automated internal linking

Automated internal linking starts paying off at a certain size:

  • You have at least 30-40 published articles. Below that, manual internal linking is probably fine.
  • You publish new articles regularly (more than 2 a month) and you want each new one to plug into your existing library automatically.
  • You have 1-3 pages you really want more internal links pointing to (your top-of-funnel keyword pages, your highest-conversion service pages, your pillar content). The link inserter is most useful when you're funneling juice to specific pages, not scattering it.
  • You care about anchor text quality. The system enforces short, natural 3-5 word anchors instead of "click here" or full URLs.

The third point shapes the setup most, because the inserter is built around a short list of priority pages. If two of them compete for the same query, settle that with a cannibalization check before pointing links at either.

When manual linking is still fine

Skip it for now if one of these describes you:

  • You're at 5-10 articles. Just do it manually with a coffee.
  • You don't have a styling guide for internal links and you're not sure what "good" looks like. Without a target, the suggestions will read fine but won't reflect your team's editorial taste. Spend an afternoon writing the rules first.
  • You're hoping for "fully automatic, never review" – not how this works. You still review every suggestion. The system saves the hours of reading-and-deciding, not the 30 seconds of yes/no.

New articles are the easiest place to start. Drafts that come out of SEO content automation can go through the opportunity finder the day they're published.

How the finder and the inserter work

The opportunity finder works like this. You give it your sitemap and an article URL, and it scrapes the article through Jina, a clean text scraper.

It sends the sitemap and the scraped article to GPT with a prompt that says "pick 5 articles from this sitemap that would be relevant to internally link from, and tell me why." GPT returns a short, structured response, and the workflow writes it into your sheet.

The link inserter works similarly. You give it an article URL plus 1-3 target URLs you want to push links to, and it scrapes the article.

For each target, it sends the article and the target's purpose to GPT with a prompt saying "find 5 places after the first 600 words where this link feels contextually relevant. The anchor text must be 3-5 words. Don't force the link – if it doesn't fit, return less than 5." GPT returns the insertions and the workflow writes them to your sheet.

Both flows run on n8n. The prompts are the part that took the most iteration – the difference between "AI internal linker spam" and contextual, useful links is entirely in the prompt. I tuned mine over 50+ articles to get the natural-reading output.

You own the workflow files and the prompts. n8n is self-hosted. GPT calls are charged at OpenAI's standard rates. No subscription SaaS, no per-link fee.

Both workflows and every prompt

Everything needed to run it without me:

  • Both n8n workflow files (the opportunity finder + the link inserter)
  • The Google Sheet templates with the right column structure pre-set
  • All the GPT prompts in plain text – you can adjust them as your editorial voice shifts
  • A short Loom showing the end-to-end flow: how to add an article to the queue, how to interpret the output, how to push approved links to WP
  • A runbook covering the common edge cases: what to do when GPT returns less than 5 suggestions (it sometimes will, deliberately), how to deal with articles behind a paywall the scraper can't read, how to schedule the workflow to auto-run on a cron

Keep the runbook next to the prompts. The first time GPT returns fewer than five suggestions, it explains why that's deliberate.

Context, not keyword matching

Internal linking is one of those things where the wiring is easy and the prompt is everything. Anyone who knows n8n can build the plumbing in an afternoon. The hard part – the part that took me 50+ runs across real customer blogs to nail – is the prompt that produces suggestions you'd actually accept, not the ones that read like "this article mentions the word marketing, so let me link to your /marketing page."

The structure of the prompt forces context-driven decisions, not keyword pattern matches. It also enforces the after-600-words rule, my own house rule for keeping the intro free of exits, which most internal-linker SaaS products don't offer.

Two cents an article in tokens

Per article: about $0.02 in OpenAI tokens (GPT-4.1-mini, the cheap one – the task doesn't need the expensive model) plus Jina scraping (free tier covers most teams). A 100-article batch costs about $2 in compute.

It's priced as part of execution capacity: a flat $2,000 a month covering the AI agents and automations, alongside a fractional Head of Content engagement. Setup covers wiring both workflows, tuning the prompts to your editorial voice and walking your editor through the review loop.

Pick the pages you want links pointing to

Start with the pages that matter most. On a call we'll look at your blog, pick the target pages you most want internal links pointing to, and decide whether the opportunity finder, the link inserter or both makes the biggest dent in the first month.

Want this built for your team?

Book a call and walk through what we'd adapt for your stack.