Automation

Scan for broken links and email a weekly report

A scenario prompt that converts a described broken-link-scan workflow into a recipe covering false positives, redirect chains, and prioritizing which links matter.

Works with Claude / GPT210 uses 4

The prompt

automation-broken-link-checker-email-report
A site owner describes their process like this: "Once a week, I want the site scanned
for broken links, both internal and external, and a report emailed to me listing
which pages have them, so I can fix them before they hurt SEO."

AVAILABLE TOOLS: [Scheduled link-checker script (trigger), custom code / cron, site
crawler, email/SMTP]

Turn this into an implementation-ready automation recipe, thinking through what the
plain description leaves ambiguous:
1. Trigger: the exact schedule and scope, deciding whether the crawl covers every
   published page or excludes ones like an archived blog section that's intentionally
   left as-is and would otherwise generate noise every single week.
2. Conditions: state the exact logic for what counts as "broken." A link returning a
   302 redirect to a working page isn't broken, but a redirect chain of four hops
   ending in a 404 is, and a temporary 503 from a flaky third-party site during the
   scan window is a false positive that shouldn't appear in the report at all.
3. Actions in order: group the report by page rather than by link, so a page with
   five broken links shows once with five entries instead of appearing five separate
   times, then sort by whether the broken link is internal (higher priority to fix)
   or external.
4. Failure handling: if the crawler times out on a large site before finishing, should
   the report send with a note that the scan was partial, or should the whole report
   be withheld until a complete scan can run, and state which choice avoids a false
   sense that everything's fine.
5. One edge case specific to this exact workflow: a link that 404s only for logged-out
   visitors because it points to a members-only page. Decide whether the crawler
   should authenticate as a test user to avoid a wave of false positives on every gated
   page.

Replace the workflow description and available tools with your own.

Redirect-chain and gated-content false positives are what make most broken-link reports get ignored after a couple of weeks, since the first two reports arrive full of noise. Since this usually needs a small custom crawler script rather than a pure no-code trigger, CodeWP is a reasonable place to generate that scan logic.