See llms.txt for all machine-readable content.

Back to Templates

Score new competitor sitemap pages weekly with Gemini, Slack and Sheets

Quick Overview

This workflow runs weekly to fetch competitor XML sitemaps (including sitemap indexes), detects newly added page URLs using an n8n Data Table, and posts per-competitor alerts to a Slack channel, with a separate Slack warning if a sitemap cannot be loaded.

How it works

  1. Runs every Monday at 09:00 using a scheduled trigger.
  2. Iterates through a configured list of competitors and downloads each competitor’s sitemap via HTTP.
  3. Parses the XML and, if the sitemap is a sitemap index, fetches and parses each child sitemap to collect all page URLs.
  4. Checks each URL against the competitor_pages n8n Data Table and keeps only URLs that do not already exist.
  5. Saves new URLs to the Data Table, groups them by competitor, and formats a message that lists up to the configured maximum number of URLs.
  6. Sends the formatted per-competitor update to Slack, or posts a Slack alert if a sitemap download fails.

Setup

  1. Create an n8n Data Table named competitor_pages with string columns for competitor and url.
  2. Update the competitor names and sitemap URLs in the Config step, and adjust max_list if you want to limit how many URLs are shown per Slack message.
  3. Add a Slack API credential (bot token with chat:write and, if needed, chat:write.public) and set the target Slack channel ID in the Slack message step.