Workflow

n8n Daily Keyword Rank Tracker

Build an n8n workflow that tracks keyword rankings daily using a SERP API, stores history in Google Sheets, and sends Slack alerts for position changes.

Overview

Automated n8n workflow that checks Google rankings for target keywords daily, stores position history in Google Sheets, compares against previous data, and sends Slack notifications when rankings change significantly.

Trigger

Daily at 8 AM UTC via n8n Cron node

Schedule

Daily at 8 AM UTC

Workflow Steps

1

Cron trigger fires

n8n Cron node triggers the workflow at the configured schedule (daily, hourly, or weekly).

2

Load keywords from sheet

Google Sheets node reads the list of target keywords and the domain to track from a spreadsheet.

3

Query search API for each keyword

HTTP Request node sends each keyword to Scavio's Google search endpoint and receives structured SERP results.

4

Extract position

Function node scans organic results for the target domain and extracts the ranking position (or null if not in top results).

5

Compare with previous position

Google Sheets node reads the previous day's position for each keyword. Function node calculates the position delta.

6

Store current position

Google Sheets node appends today's date and position to the history sheet for each keyword.

7

Alert on significant changes

IF node checks whether any keyword moved more than 3 positions up or down. Slack node sends a formatted alert with the changes.

Python Implementation

Python
import requests, os, json
from datetime import date

H = {"x-api-key": os.environ["SCAVIO_API_KEY"]}
DOMAIN = "scavio.dev"
KEYWORDS = ["best search api 2026", "serp api pricing", "multi-platform search api"]

for kw in KEYWORDS:
    r = requests.post("https://api.scavio.dev/api/v1/search", headers=H,
        json={"platform": "google", "query": kw}, timeout=10).json()
    organic = r.get("organic", [])
    pos = next((i+1 for i, o in enumerate(organic)
        if DOMAIN in o.get("link", "")), None)
    print(json.dumps({"keyword": kw, "date": str(date.today()), "position": pos}))

JavaScript Implementation

JavaScript
const H = {"x-api-key": process.env.SCAVIO_API_KEY, "Content-Type": "application/json"};
const DOMAIN = "scavio.dev";
const KEYWORDS = ["best search api 2026", "serp api pricing"];

for (const kw of KEYWORDS) {
  const r = await fetch("https://api.scavio.dev/api/v1/search", {
    method: "POST", headers: H,
    body: JSON.stringify({platform: "google", query: kw})
  }).then(r => r.json());
  const pos = (r.organic || []).findIndex(o =>
    o.link?.includes(DOMAIN)) + 1;
  console.log(JSON.stringify({keyword: kw, position: pos || null}));
}

Platforms Used

Google

Web search with knowledge graph, PAA, and AI overviews

Frequently Asked Questions

Automated n8n workflow that checks Google rankings for target keywords daily, stores position history in Google Sheets, compares against previous data, and sends Slack notifications when rankings change significantly.

This workflow uses a daily at 8 am utc via n8n cron node. Daily at 8 AM UTC.

This workflow uses the following Scavio platforms: google. Each platform is called via the same unified API endpoint.

Yes. Scavio's free tier includes 500 credits per month with no credit card required. That is enough to test and validate this workflow before scaling it.

n8n Daily Keyword Rank Tracker

Build an n8n workflow that tracks keyword rankings daily using a SERP API, stores history in Google Sheets, and sends Slack alerts for position changes.