πŸ“Š Find and triage keyword cannibalization with Search Console, OpenAI, and Gmail

⚑ 3 views Β· πŸ“Š Market Research & Insights

πŸ’‘ Pro Tip β€” For competitive intelligence, ScraperNode can automate the data collection β€” Yelp reviews, Glassdoor company data, and Crunchbase profiles all return structured JSON you can feed straight into this workflow.

View All Scrapers

Description

Quick overview

This workflow checks Google Search Console for queries where multiple site URLs appear, verifies whether the overlaps are real by fetching each URL’s redirect/canonical/hreflang signals, uses an OpenAI chat model to recommend which page should own each query, and emails a weekly Gmail digest.

How it works

  1. Runs every Monday morning on a schedule or starts manually after a site migration.
  2. Queries the Google Search Console Search Analytics API for two 28‑day windows grouped by query and page, then groups results to find queries with multiple URLs and filters out operator queries (for example, site:) and long zero-click AI Mode prompts.
  3. If any candidates remain, fetches each distinct URL once without following redirects and extracts the HTTP status, Location header, canonical URL, and hreflang alternates.
  4. Classifies each query’s top URL pair as a redirect, canonical duplicate, hreflang/locale alternate, or a real overlap, and suppresses pairs already reported unless impressions have grown significantly.
  5. Sends only the real, reportable overlaps to an OpenAI-compatible chat model in a single prompt to recommend which URL to keep and what action to take on the other.
  6. Upserts the reported pairs into an n8n Data Table for history and builds a digest that includes ruled-out counts and the actionable shortlist.
  7. Sends the digest email via Gmail to the configured recipient.

Setup

  1. Create Google API credentials (service account or OAuth as used by your instance) with access to the Search Console API, and add the account email as a user on the target Search Console property.
  2. In the Settings node, set your Search Console property ID (for example, sc-domain:example.com or https://example.com/), thresholds (days, min impressions, max query length), locale prefixes, and the digest recipient email address.
  3. Create an n8n Data Table named query_overlaps with columns pair_key, query, urls, verdict, impressions, and last_seen.
  4. Add a Gmail credential for sending the digest email.
  5. Add an OpenAI-compatible credential/model configuration for the LangChain ChatOpenAI node and select the model you want to use.

Requirements

Customization

πŸ”— Nodes Used

HTTP Request, Gmail, Schedule Trigger, Filter, Basic LLM Chain, OpenAI Chat Model

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup