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
Cron trigger fires
n8n Cron node triggers the workflow at the configured schedule (daily, hourly, or weekly).
Load keywords from sheet
Google Sheets node reads the list of target keywords and the domain to track from a spreadsheet.
Query search API for each keyword
HTTP Request node sends each keyword to Scavio's Google search endpoint and receives structured SERP results.
Extract position
Function node scans organic results for the target domain and extracts the ranking position (or null if not in top results).
Compare with previous position
Google Sheets node reads the previous day's position for each keyword. Function node calculates the position delta.
Store current position
Google Sheets node appends today's date and position to the history sheet for each keyword.
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
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
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
Web search with knowledge graph, PAA, and AI overviews