Find broken external links in WordPress posts and email a report 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 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 schedule or manual run.

How it works
Runs manually or every Monday at 9am.
Fetches the latest published posts from the WordPress REST API using HTTP Basic Auth.
Extracts external (non-site) URLs from each post’s HTML content and limits the run to a maximum number of links.
Checks each extracted URL with batched HTTP HEAD requests using a configurable timeout.
Classifies each link as ok, broken, or review based on the HTTP status code or request errors.
Builds an HTML report summarizing totals and listing only broken or review links.
Sends the report via Gmail when issues are found and email reporting is enabled, otherwise outputs the report data without emailing.

Setup
Create a WordPress Application Password and configure an HTTP Basic Auth credential in n8n for your WordPress user.
In the Config values, set your WordPress site URL, how many posts to scan, link limits, and the request timeout.
(Optional) Add a Gmail credential, set the recipient email address, and enable emailReport to true to send the report automatically.

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