Find broken external links in WordPress posts and email a report with Gmail
Ready for 3.0What this workflow does
This workflow has 11 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, postsToScan, maxLinksPerRun…
- Get published posts (HTTP Request): calls an HTTP API (GET)
- Extract external links (Code): runs custom JavaScript code
- Check link (HTTP Request): calls an HTTP API (HEAD)
- Classify results (Code): runs custom JavaScript code
- Build report (Code): runs custom JavaScript code
- Send report email? (If): checks a condition and branches into true / false
- Email report with Gmail (Gmail): send (message)
- Report (not emailed) (Edit Fields (Set)): sets 5 fields: subject, checked, brokenCount…
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
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 scans recent published WordPress posts for external links, checks each link with HTTP HEAD requests, and compiles an HTML report of broken links or links needing manual review, optionally sending the report via Gmail on a weekly…