{"product_id":"n8n-workflow-audit-stale-wordpress-posts-gmail-digests","title":"n8n Workflow: Audit Stale WordPress Posts \u0026 Gmail Digests","description":"\u003ch3\u003eKeep your WordPress content fresh—automatically\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow scans your WordPress site for posts that haven’t been updated for a configured number of months, ranks them by refresh priority, generates an HTML digest, and can optionally email the report via Gmail.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cp\u003eDesigned for monthly review (or on-demand runs), it:\u003c\/p\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSchedules automatically\u003c\/strong\u003e: runs on the \u003cstrong\u003efirst day of every month at 09:00\u003c\/strong\u003e, or you can start it manually.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReads your configuration\u003c\/strong\u003e: pulls values like \u003ccode\u003esiteUrl\u003c\/code\u003e (no trailing slash), \u003ccode\u003estaleAfterMonths\u003c\/code\u003e, \u003ccode\u003epostsToScan\u003c\/code\u003e, \u003ccode\u003emaxRowsInReport\u003c\/code\u003e, and email settings.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFetches stale posts via the WordPress REST API\u003c\/strong\u003e: requests published posts with a \u003cem\u003elast modified\u003c\/em\u003e date older than your cutoff.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eScores refresh priority\u003c\/strong\u003e: strips HTML to count words, detects mentions of older years, then assigns \u003cstrong\u003eHigh \/ Medium \/ Low\u003c\/strong\u003e priority based on age and year mentions.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eBuilds a clear report\u003c\/strong\u003e: sorts posts by priority and age, then generates an \u003cstrong\u003eHTML table digest\u003c\/strong\u003e plus a subject line summarizing the findings.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends (or skips) via Gmail\u003c\/strong\u003e: if stale posts exist and \u003ccode\u003eemailReport\u003c\/code\u003e is enabled, it emails the digest to \u003ccode\u003ereportEmail\u003c\/code\u003e; otherwise it outputs a result indicating the email was skipped.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS operators maintaining a WordPress knowledge base who want a monthly \u003cstrong\u003econtent freshness audit\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers who need an \u003cstrong\u003en8n WordPress reporting workflow\u003c\/strong\u003e for backlog management.\u003c\/li\u003e\n  \u003cli\u003eTeams that want an email-based digest to plan updates for outdated posts and year-specific content.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWordPress integration\u003c\/strong\u003e: WordPress REST API using \u003cstrong\u003eHTTP Basic Auth\u003c\/strong\u003e with a WordPress Application Password.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNodes used\u003c\/strong\u003e: \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003eset\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003ehttp request\u003c\/code\u003e, \u003ccode\u003egmail\u003c\/code\u003e (plus a sticky note).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOutput\u003c\/strong\u003e: HTML digest table, summary subject line, and optional Gmail sending.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eSetup checklist\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCreate a WordPress Application Password and add it to n8n as an HTTP Basic Auth credential for the REST API request.\u003c\/li\u003e\n  \u003cli\u003eUpdate \u003ccode\u003esiteUrl\u003c\/code\u003e, \u003ccode\u003estaleAfterMonths\u003c\/code\u003e, \u003ccode\u003epostsToScan\u003c\/code\u003e, and \u003ccode\u003emaxRowsInReport\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003eOptional: configure Gmail credentials, set \u003ccode\u003ereportEmail\u003c\/code\u003e, and set \u003ccode\u003eemailReport\u003c\/code\u003e to \u003cstrong\u003etrue\u003c\/strong\u003e to enable sending.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46244562305203,"sku":"N8N-21091","price":46.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/WbO5Jl_kuL66HM2JOcIeB_UGHEZ7Oc.png?v=1792402114","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-audit-stale-wordpress-posts-gmail-digests","provider":"N8N Commerce","version":"1.0","type":"link"}