AgentHub

Track Google keyword rankings with Apify, OpenAI, Google Sheets and Gmail

Quick overview

Live
Open / InstallLast updated July 27, 2026

Description

Quick overview This workflow runs daily to scrape Google SERPs for a list of keywords using Apify, logs ranking results to Google Sheets, generates an HTML SEO summary with OpenAI, and emails the report via Gmail. How it works Runs every day at 8 AM on a schedule. Reads the configured keywords, target domain, locale settings, and report recipient, then splits the comma-separated keywords into individual items. For each keyword, calls the Apify Google Search Scraper API to fetch the top organic Google results for the chosen country and language. Extracts each result into ranking rows (date, keyword, position, title, URL, domain, description) and flags whether the result matches the target domain. Appends the ranking rows to a Google Sheets spreadsheet to build a daily ranking history. Aggregates all collected rankings and sends them to OpenAI to generate a concise HTML SEO report with your positions, top competitors, and prioritized opportunities. Sends the HTML report to the configured recipient using Gmail. Setup Add an Apify API token (HTTP header auth) and select it in the Apify request step. Add a Google Sheets OAuth connection, select the target spreadsheet and sheet tab, and ensure the sheet has columns for checked_at, keyword, rank, title, url, domain, description, and is_target_domain. Add an OpenAI API key and select it for the OpenAI Chat Model used to generate the report. Add a Gmail OAuth connection to send email, then set your keywords, target domain, country/language codes, results per keyword, OpenAI model, and recipient email in the Configuration step. Additional info Track keyword rankings on Google with Apify and send AI SEO reports by email šŸ“„ Open full documentation on Notion Need help customizing? Contact me for consulting and support : Linkedin MY NEW YOUTUBE CHANNEL šŸ‘‰ Subscribe to my new YouTube channel. Here I'll share videos and Shorts with practical tutorials and FREE templates for n8n. An n8n automation workflow template by Dr. Firas.

Author

Dr. Firas

Platform

web

Pricing model

free

Categories

Automation
AI

Tags

n8n
workflow
google-sheets
http-request
gmail
code
basic-llm-chain
openai-chat-model

Capabilities

  • 6 nodes
  • 14 views