Skip to content
VibeAISEO
VibeAISEOGet $100 free

Post-mortem

Competitor link flow in n8n: a post-mortem of a first prompt-built version

This is a worked walkthrough of a hypothetical first build. The mistakes are the useful part, because every one of them is common when an assistant writes your workflow.

Paper bridge with cracks showing broken competitor link flows and repair costs
This is an example

The numbers below are made up for illustration. The credit prices are real: 1 credit is $0.0001, and compare costs 1 credit per call.

The goal in one sentence

Every Monday, mail me the DR of my domain and of three rivals, and flag any rival that moved. That is all.

The builder, a shop owner we will call the founder, had never opened n8n before. Not once. They pasted that sentence into an assistant and asked for an importable workflow. What came back looked fine on screen, which is exactly why it is worth taking apart.

What the first version did, step by step

  1. 1

    Schedule node

    Fired every Monday at 08:00. This part was right and stayed untouched.

  2. 2

    Four HTTP Request nodes

    One per domain, each calling overview. Free, but four nodes meant four places to fix a typo.

  3. 3

    A Code node that guessed field names

    The assistant had never seen a real response, so it invented names. The email arrived with the word undefined in every row.

  4. 4

    An error branch that retried

    On any failure it waited ten seconds and started again, with no limit. Harmless on free calls, dangerous once a paid one is added.

The three fixes, ranked by how much damage they prevent

ProblemSeverityFix to ask for
Unbounded retry loopHighStop after 2 tries, then send one alert mail
Invented field namesMediumPaste one real JSON response into the prompt
Four near-identical nodesLowOne compare call for all four domains
Parallel tool sets on a workshop bench symbolizing efficient parallel processing

How to read the rebuild

The second version worked on the first run. It was also boring, and that is the compliment.

The founder then added a second branch, on their own, that mailed a list of the rival's top linking domains using refdomains. That is a 2-credit call and it fits the same single-run pattern, so it needed no new safety rules beyond the ones already written into the prompt.

Changing one thing at a time was the real lesson. Each addition got its own prompt, its own test with three domains and its own look at the credit balance.

Why one compare call beats four lookups

compare accepts up to 20 domains and bills 1 credit once, however many rows come back. Four free lookups cost nothing, so the saving here is tidiness, not money.

The money argument starts at scale. Imagine a founder tracking 15 rivals weekly: that is still one call and $0.0001 per run, about $0.0052 a year. The weekly run is not where budgets die, loops are.

If you want the rivals' actual link sources and not only their scores, step up to refdomains at 2 credits. The cost table shows what each action adds to a weekly run.

Why the Monday run fires twice, or not at all

A schedule looks like the simplest part of a flow, and it is where most first builds go quiet. The clock is only as good as the copy of the workflow that is switched on. Check that first.

Three situations cause nearly all of the trouble people describe. Each one is easy to test once you know it exists.

The test address and the live address are different

If a flow ever gains a webhook, n8n gives it two addresses. The test one answers only while you are editing, and the live one answers once the workflow is active. Copy the wrong one into a form or a partner's system and the flow looks dead when it is not.

Say you test the flow on a Friday, then activate it and wait for Monday. Nothing arrives. The usual cause is a caller that still points at the test address, so copy the production address after activation and run one test against it.

  • Test address: answers only while the editor is open
  • Production address: answers only after the workflow is active

One active copy, not two

Duplicating a flow is the quickest way to double your calls without noticing. Both copies can fire at 08:00, and each one sends the same compare request. Picture a founder who copies the flow to try a new rival, then forgets to switch the copy off. Monday brings two emails and two calls.

Before you activate anything, open the workflow list and count the active flows that touch the API. Keep one. Rename the other copy with a word such as old, so you can tell them apart later.

Once the flow works, write its name, its schedule and the place where its key lives in a short note. That note is the first thing a new owner will need.

Changing the rival list without a surprise on Monday

Edit the domain list in the one place the flow reads it, then run the workflow once by hand before the schedule takes over. A manual run costs the same single call as a scheduled one, so the test is cheap.

Look at the output of that run, not only at the green tick. If a rival you just added shows an empty row, fix the domain before Monday rather than after.

The prompt that produced the second version

Paste a real response where the placeholder is. That single change removed the undefined values.

text
Build an importable n8n workflow.
Trigger: every Monday 08:00.
One HTTP Request node, GET
https://vibeaiseo.com/api.php?action=compare&q=MYDOMAIN.com,RIVAL1.com,RIVAL2.com
Header: Authorization: Bearer {{$env.VIBEAISEO_KEY}}
Here is a real response, use only these field names:
<PASTE JSON HERE>
Then send one email with a table.
On error: retry at most 2 times, then send an alert and stop.

After the rebuild

What we would keep from the post-mortem

Keep the schedule, the single call and the stop rule. Drop anything the assistant added that you cannot explain in one sentence.

  • One call per run
  • A real response pasted into the prompt
  • A hard stop on retries
Gardener next to a hedge hiding an empty core representing silent failures

Catching failures the retry branch cannot see

The retry rule in the flow handles one thing: a failed HTTP call. It cannot see a node that never ran, a workflow someone switched off, or a run that finished with no rows. Those failures need a different net.

Mind the gap between a green run and a useful one. A run can succeed and still send an email with nothing in it.

An error workflow as a second net

n8n can start a separate workflow whenever another one fails. Ask the assistant for a small one that sends you the workflow name, the failing node and the time. Keep it separate, so a bug in the main flow cannot also silence its own alarm.

Ask for the alert to go out on a different channel from the report. If the report channel is the thing that broke, a second email from the same account is no help.

Reading the run history once a week

Even with an alarm in place, open the execution list once a week. A run that finished in two seconds with an empty table is a warning sign, not a success.

Look at the pattern across weeks. One empty Monday is noise. Four in a row points to a rival that dropped out of the index or a key that stopped working.

Alert text that names the domain

An alert that says only error is useless on a Monday morning. Ask the assistant to put the domain list and the status code into the message. Knowing that one of the four domains failed with a 402 saves a long search.

Status codes are the first thing to read: a 401 points at the key, a 402 points at the balance. Both ask for a different fix, so the message should say which one happened.

Put the run date in the subject line as well. A subject that names the Monday it covers stops two weeks of alerts from blending into one.

Where this still falls short

The data refreshes about monthly, so a weekly run will show the same numbers three weeks out of four. That is fine, though a founder who expects daily movement will think the flow is broken.

For keyword and rank tracking, Ahrefs or Semrush are the fuller products. This API is about link data. Before you wire in anything paid, read the guardrails and keep the troubleshooting table open in a tab.

Questions people ask about a first n8n build

Do I need to know n8n before I start?

No, but you need a rough idea of what the flow should do, one real API response to paste and a way to see the run history. Expect the first build to take longer than the assistant's first reply suggests.

Should a competitor link check call the API once or once per domain?

Once, when the endpoint accepts a list. compare takes up to 20 domains and costs 1 credit per call, so the four-domain flow in this post needs one request. A call per domain is the pattern to avoid.

Where should the key live inside n8n?

In an n8n credential or an environment variable that the flow reads, never typed into a node you might share. The guardrail page applies the same rule to other tools.

Does a scheduled flow run when my computer is off?

That depends on where n8n runs. A self-hosted instance only fires while it is running, and a cloud instance keeps the schedule for you. Check which one you have before you promise a Monday report to anyone.

What if the assistant uses a node that does not exist in my version?

Tell it your n8n version in the prompt and ask it to list the nodes it plans to use before it writes the flow. You catch a missing node in one line instead of after fifty broken ones.