Skip to main content

Detect stale website content with OpenAI, Google Sheets, and Gmail

Workflow preview

Workflow preview
100%
Detect stale website content with OpenAI, Google Sheets, and Gmail preview
Open on n8n.io

1. Workflow Overview

Stale Content Detector for Websites Who is this for Content marketers, SEO managers, and website owners who want to automatically find pages on their site that are outdated or need refreshing — wit...

Best for

  • Market Research automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.html, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Alejandro Alfonso.

Original n8n.io source

1.1 Workflow description

Title
Detect stale website content with OpenAI, Google Sheets, and Gmail
Workflow name
Detect stale website content with OpenAI, Google Sheets, and Gmail

Stale Content Detector for Websites

Who is this for

Content marketers, SEO managers, and website owners who want to automatically find pages on their site that are outdated or need refreshing — without manually auditing every page.

What it does

This workflow fetches your sitemap, identifies pages that have not been updated in a configurable number of days, fetches each stale page, and uses AI to assess whether the content is actually outdated or still accurate.

  • Sitemap parsing: Fetches your sitemap.xml and extracts all URLs with their last-modified dates
  • Staleness filtering: Flags pages not updated in more than X days (default: 180) and sorts by most stale first
  • Page content extraction: Fetches each stale page and extracts the title and body text
  • AI freshness analysis: An OpenAI-powered agent reviews each page and rates it LOW, MEDIUM, HIGH, or CRITICAL with specific update suggestions
  • Audit logging: Saves every reviewed page to a Google Sheet with the full AI analysis
  • HTML email report: Builds a color-coded summary email showing each flagged page with its AI verdict and sends one consolidated digest

How to set up

  1. Open Site Configuration and set your sitemapUrl, staleDays (default: 180), and alertEmail
  2. Create a Google Sheet with a ContentAudit tab (columns: scan_date, page_url, last_modified, days_since_update, ai_review)
  3. Paste your Google Sheet URL into the Save to Content Audit Sheet node
  4. Connect your Gmail OAuth2 credentials on the Email Content Audit Report node
  5. Connect your Google Sheets credentials
  6. Connect your OpenAI API credentials on the OpenAI Chat Model node
  7. Activate — runs every Monday at 7 AM

Requirements

  • n8n account (cloud or self-hosted)
  • A website with a sitemap.xml (most CMS platforms generate one automatically)
  • OpenAI API key (uses gpt-4o-mini)
  • Gmail account with OAuth2
  • Google Sheets

How to customize

  • Change the staleDays threshold in Site Configuration (default: 180 days / 6 months)
  • Increase the page limit above 20 in the Code node for larger sites
  • Add specific URL path filters to focus on blog posts, docs, or landing pages only
  • Replace Gmail with Slack for faster team notifications
  • Connect to your CMS API (WordPress, Ghost, Webflow) to pull content directly instead of scraping

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Weekly Scan (Monday 7 AM)

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 2 - Site Configuration

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Fetch Sitemap XML

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Parse Sitemap URLs

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Any Stale Pages?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 6 - Fetch Page Content

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - Extract Page Text

Type / Role
n8n-nodes-base.html - html
Config choices
Version 1.2

Block 8 - AI Content Freshness Analyzer

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 9 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 10 - Build Report Row

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Save to Content Audit Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 12 - Email Content Audit Report

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 13 - Combine Into One

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 14 - Build Email Body

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Detect stale website content with OpenAI, Google Sheets, and Gmail
Complexity advanced
Nodes 19
Categories Market Research, AI Summarization
Author Alejandro Alfonso
Published 26 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14375/14375.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Detect stale website content with OpenAI, Google Sheets, and Gmail do?

Stale Content Detector for Websites Who is this for Content marketers, SEO managers, and website owners who want to automatically find pages on their site that are outdated or need refreshing — wit...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research, AI Summarization use case.