Audit stale WordPress posts and email refresh digests with Gmail
Ready for 3.0What this workflow does
This workflow has 9 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Gmail.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Config (Edit Fields (Set)): sets 6 fields: siteUrl, staleAfterMonths, postsToScan…
- Get stale posts (HTTP Request): calls an HTTP API (GET)
- Score stale posts (Code): runs custom JavaScript code
- Build digest (Code): runs custom JavaScript code
- Send digest email? (If): checks a condition and branches into true / false
- Email digest with Gmail (Gmail): send (message)
- Digest (not emailed) (Edit Fields (Set)): sets 4 fields: subject, staleCount, highPriorityCount…
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (7)
- Manual Trigger
n8n-nodes-base.manualTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail
From the author
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…