Workflow watchdog and uptime monitor
Built the day I found a nightly workflow had been failing for two weeks and nobody knew. The client's rule was simple: everything must run all the time, check daily, heal what you can, email me only when you can't.
- Runs
- daily at 06:30 UTC
- Watches
- every active workflow
- Heals
- re-fires once, never twice
- Emails
- only when a person is needed
Why it exists
Two dozen scheduled workflows and no one watching them. A failure only surfaced when someone noticed the data had stopped moving, which on a nightly pipeline can take weeks.
How it runs
List
Pulls every active workflow through the n8n API and the last twenty executions of each.
Errors
Anything that errored in the last 24 hours and hasn't since recovered is flagged.
Stalls
A stall threshold per workflow: at least 36 hours, or 1.8 times that workflow's usual gap between runs, so a Monday job isn't reported missing on Wednesday.
Credits
Failures that match a credit or quota message, from the AI API, the enrichment provider, the email checker or the search API, are marked action needed and never re-fired. Re-firing those only burns more.
Heal
Everything else gets its own production webhook fired once. If it recovers, the next morning's report says so.
Report
A heartbeat row goes into an alerts table every day with the findings, and an email goes out only when a person has to do something.
Uptime
A second job probes the public apps every five minutes and emails on down and on recovery. A GitHub Actions check does the same from outside the box every fifteen minutes and opens an issue, so an outage of the box itself still gets seen.
What came out of it
The first live run caught a verifier that had been timing out every night and a nightly job running out of memory, and re-fired the first one. Since then the morning email is the only way anyone hears about a broken workflow, and most days there isn't one.
Notes
The adaptive stall threshold is the part worth copying. A fixed number either misses a stalled nightly job or cries wolf on every weekly one. Two things I learned the hard way: the n8n container resolves its own public hostname to itself, so the box has to be probed from outside, and workflow static data only persists on production runs, not editor test runs.
Stack
- n8n
- n8n public API
- Supabase
- Microsoft Graph mail
- GitHub Actions
Want something like this built?
Tell me what you're trying to automate. Most things can be built in a week or two.