n8n + SERP API: Build a Daily Rank Tracker in 30 Minutes

By Serpent API Team · · 10 min read

n8n went from "the open-source Zapier" to a default automation tool somewhere in 2025. By 2026 every dev I know runs at least one n8n workflow in production. The combination of self-hosting, the visual editor, and the ability to drop into JavaScript anywhere is hard to beat.

This guide walks you through building a daily Google rank tracker in n8n — no code, well, a tiny bit of code in one node, but no whole Python project. By the end you'll have a workflow that runs every morning, checks your target keywords on Google, logs positions to a Google Sheet, and pings Slack if anything dropped.

Why n8n for rank tracking

Honestly, three reasons:

1. The visual editor wins for explaining the workflow to a teammate. A Python script with eight functions takes a stand-up to walk through. An n8n workflow with six nodes takes 30 seconds.

2. Credentials managed once. You authenticate Google Sheets and Slack once in n8n; every workflow re-uses them. No more .env shuffling.

3. Self-hostable. If you have any compliance concern about keyword data leaving your perimeter, host n8n on your own server. The hosting docs show a working Docker setup in 5 minutes.

If you've previously built rank trackers in Python, you might enjoy our Python rank tracker tutorial — same outputs, different surface. Or if Zapier is your home base, the Zapier guide mirrors this one node-for-node.

What you'll need

Before you start, create a Google Sheet with two tabs:

Fill the keywords tab with your tracked terms. Example row: cheapest serp api, apiserpent.com, us.

Step 1: Schedule trigger

In n8n, create a new workflow. Add a Schedule Trigger node. Set it to fire once a day at 06:00 UTC (or whatever time works for you).

That's the entire node configuration. The workflow now starts itself every morning.

Step 2: Read keywords from Google Sheets

Add a Google Sheets node. Authenticate with OAuth on first run. Configure:

Run the node once to verify — you should see your keyword list flowing through.

Step 3: SERP API call (HTTP Request node)

This is the core. Add an HTTP Request node connected after Google Sheets. Configure:

n8n's {{ $json.field }} syntax pulls values from the previous node, so each row in the keywords sheet triggers one SERP API call.

Run the workflow with sample data — you should see the full Serpent JSON response in the output panel. Confirm results.organic is populated.

Step 4: Parse position with a Code node

The SERP API gives you 50 organic results. We need the one that matches the target domain. Add a Code node (JavaScript) with this body:

const domain = $('Google Sheets').item.json.domain;
const keyword = $('Google Sheets').item.json.keyword;
const organic = $input.first().json.results.organic || [];

const hit = organic.find(r => r.url && r.url.includes(domain));

return {
  json: {
    date: new Date().toISOString().slice(0,10),
    keyword,
    position: hit ? hit.position : null,
    url: hit ? hit.url : ""
  }
};

That's the only code in the entire workflow. It picks the first organic result whose URL contains your tracked domain, defaults to null if not found.

Step 5: Append result to Google Sheets

Add a second Google Sheets node. Configure:

Done. After tomorrow's run you'll have your first row of historical rank data.

Step 6: Slack alert on drop

Optional but very useful. Add an If node before the Google Sheets append, comparing today's position to yesterday's:

For the second condition you'll add another small Google Sheets → Get rows node that fetches the most recent row for the keyword. Compare in the If node.

Route the "true" branch into a Slack node configured with your Incoming Webhook. Message:

:warning: Rank drop on *{{ $json.keyword }}*
Today: {{ $json.position }} | Yesterday: {{ $('Last Row').item.json.position }}
URL: {{ $json.url }}

Save and activate the workflow. From tomorrow morning, every drop on tracked keywords pings you in Slack with the URL that lost the spot.

Need higher rate limits? The Serpent Google SERP API handles concurrent requests on every paid tier; Scale plans start at $0.05 per 1,000 calls. See pricing →

Production tips

1. Batch the schedule. If you track 500 keywords, don't fire 500 simultaneous HTTP Request calls. n8n's "Split In Batches" node lets you process 20 at a time with a 30-second pause between batches.

2. Add retries. The HTTP Request node has a Retry On Fail toggle. Turn it on. Network blips happen.

3. Capture AI Overview presence too. Bump your Code node to also record $input.first().json.results.aiOverview ? true : false. Use it later to correlate rank drops with AIO appearances — see our decoupling guide.

4. Don't forget weekly digests. A second workflow fires every Monday morning, reads the last 7 days of history, and Slacks a top-mover summary. Same node pattern, different filter.

5. Version your workflow JSON in Git. n8n exports a workflow as JSON. Drop that file into the same repo as your code so the automation has a change history.

One workflow, lots of variations

Once you've shipped the basic tracker, the same pattern adapts to a dozen related jobs without major change:

If you build any of these and want to share, the SEO report automation guide has the recipe for the Markdown side.

FAQ

Can I do this without writing any code at all?

Almost. The Code node has 12 lines of JavaScript — nothing complex, but technically it is code. If you want it pure no-code, replace the Code node with an Extract From File node and a series of If branches; it works but is less elegant.

Does n8n Cloud support this workflow?

Yes. Every node used here is core. The free tier handles small workflows; the Starter tier covers most tracking jobs.

How many keywords can I track?

Hundreds easily. The constraint is your SERP API spend — 100 keywords daily for a month is 3,000 calls, about $0.15 at Scale tier.

Can I add AI Overview tracking?

Yes. The Serpent Google SERP API returns aiOverview in the same response; expose it through the Code node. See the AIO extraction guide for the field shape.

Can I run this self-hosted on a Raspberry Pi?

Yes. n8n's Docker image runs on ARM. For 100 keywords / day, a Pi 4 is overpowered.

Run Your Daily Rank Check Tonight

Serpent's Google SERP API works out of the box with n8n's HTTP Request node. 100 free calls on signup. Scale tier from $0.05 per 1,000 calls.

Get Your Free API Key

Explore: Google SERP API · News API · Pricing · Docs