Audit stale WordPress posts and email refresh digests with Gmail

Go to Workflow
0 views
Built by Bincy Bhanu. S Bincy Bhanu. S
Created on October 16, 2026

Description

Quick overview
This workflow runs monthly (or on demand) to find WordPress posts that haven’t been updated for a configured number of months, scores and ranks them by refresh priority, builds an HTML digest, and optionally emails the report via Gmail.

How it works
Runs on the first day of every month at 09:00 (or starts manually).
Reads configuration values like site URL, staleness cutoff, scan limit, and email settings.
Calls the WordPress REST API to fetch published posts last modified before the cutoff date.
Strips HTML to count words, detects mentions of older years, and assigns a High/Medium/Low refresh priority based on age and year mentions.
Sorts posts by priority and age, then generates an HTML table digest and subject line summarizing the findings.
If stale posts exist and email sending is enabled, sends the HTML digest to the configured recipient using Gmail; otherwise it outputs a result indicating email was skipped.

Setup
Create a WordPress Application Password and add an HTTP Basic Auth credential in n8n, then select it for the WordPress REST API request.
Update the Config values, including siteUrl (no trailing slash), staleAfterMonths, postsToScan, and maxRowsInReport.
Optional: add a Gmail credential, set reportEmail, and set emailReport to true to enable sending the digest email.

This workflow was created by Bincy Bhanu. S and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (3)

Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
HTTP Request
n8n-nodes-base.httpRequest