Heartbeat monitoring for n8n: ping URLs that alert on missed runs
A heartbeat for n8n is an HTTP Request node at the end of a workflow that calls a ping URL each time the run gets there. The monitoring service expects that call on a schedule and alerts when it's late. It catches runs that never start or stop halfway; it can't tell you what the run did.
Last updated · By Marc Vergara
This page is part of the n8n workflow monitoring guide. Heartbeats are one of four approaches compared in how to monitor n8n workflows; here is how to set one up so it doesn't send false alarms or miss real ones.
Why a heartbeat catches what the error workflow misses
The error workflow needs an execution that ends in an error. A heartbeat needs nothing from n8n: silence is the alert.
A deactivated workflow, a Schedule Trigger that stopped firing, a dead instance or a run that got stuck all produce no error. They also produce no ping, so the monitoring service notices once the expected time plus the grace period has passed. That's why the n8n error workflow can stay quiet while a heartbeat fires.
Where to put the ping in the workflow
After the last step that matters, not right after the trigger. A ping after the trigger only proves the workflow started.
- Set Execute Once on the ping node. Otherwise the HTTP Request node runs once per item, and 200 items means 200 pings. Healthchecks.io asks for no more than 5 pings per minute to one check.
- Let 0 items skip the ping, on purpose. In n8n, a node only runs when it receives items, so a run that processed nothing never reaches the ping. For a workflow that should always find work, that turns an empty run into an alert. Don't turn on Always Output Data on the node before the ping, or the empty run pings anyway.
- Don't let the ping break the workflow. Set the ping node's On Error to Continue, so a timeout at the monitoring service doesn't mark a good run as failed.
Period and grace time
The period is how often the ping should arrive; the grace time is how late it can be before you get an alert. Set the period to the schedule and the grace time to the slowest normal run plus some slack.
Healthchecks.io offers simple schedules (period and grace time) and cron schedules, where you paste the same cron expression and time zone as the n8n Schedule Trigger. Cron schedules check that the run happened at the right time, which matters for workflows that only run on weekdays. Uptime Kuma's push monitor uses a heartbeat interval in the same way.
| n8n schedule | Period (or cron) | Grace time |
|---|---|---|
| Every 15 minutes | 15 minutes | 10 minutes |
| Every hour | 1 hour | 20 minutes |
| Daily at 08:00 | 0 8 * * * in the workflow's time zone | 1 hour |
| Weekdays at 09:00 | 0 9 * * 1-5 in the workflow's time zone | 1 hour |
Signal start and failure, not only success
Healthchecks.io accepts /start and /fail on the same ping URL. Both make the alert faster.
Call /start right after the trigger and the plain URL at the end. The service then measures how long each run takes and alerts when a run started but didn't finish within the grace time. Call /fail from the error output of the steps you care about, and the alert arrives at once instead of waiting for the ping to be late. Healthchecks.io also accepts a POST body and keeps its first 100 kilobytes, so you can send the item count or the error message with the ping.
Healthchecks.io, Uptime Kuma or UptimeRobot
Any service with a push or heartbeat monitor works. The differences are price, hosting and how many checks you need.
On their pricing pages, Healthchecks.io's free plan covers 20 checks and its Business plan 100 checks for $20 a month; its code is open source and can be self-hosted. Uptime Kuma is free and self-hosted, and its push monitors also work for n8n. UptimeRobot lists heartbeat (cron job) monitoring among the monitor types of its paid plans, not the free one. Host the monitor away from the n8n server, or it goes down with it.
What a heartbeat can't tell you
A ping says the run reached its last step. It doesn't say what the run did there.
- A run that processed 10 items when it usually processes 300 still pings. Checking that a workflow did its job covers that case.
- A node set to Continue on Fail can turn an error into data, and the run still reaches the ping.
- You need one check per workflow, named after the client and its purpose, and you have to edit every workflow to add the node.
For a handful of workflows, that's a fair trade. For dozens of client workflows, a check that reads executions through the n8n API covers missed runs, errors and item counts without touching the workflows; see Uptime Kuma, Grafana or per-workflow checks for the comparison.
FAQ
- How do I add a heartbeat to an n8n workflow?
- Add an HTTP Request node at the end of the workflow that calls the ping URL from Healthchecks.io, Uptime Kuma or a similar service. Set the node to Execute Once and its On Error to Continue, then set the check's period to the workflow's schedule.
- What is a dead man's switch for n8n?
- It's another name for a heartbeat: the monitoring service expects a ping on a schedule and alerts when it doesn't arrive. It catches runs that never start, which the n8n error workflow can't.
- Why does my heartbeat ping many times per run?
- The HTTP Request node runs once per item. Turn on Execute Once in the node's settings so it calls the ping URL a single time.
- Does a heartbeat catch a workflow that runs but processes nothing?
- Only if the ping comes after a node that receives no items in that case. In n8n a node with no input items doesn't run, so the ping is skipped and the check alerts. It can't catch a run that processed fewer items than usual.
- Can I use Uptime Kuma for n8n heartbeats?
- Yes. Create a push monitor and call its URL from the HTTP Request node at the end of the workflow. Host Uptime Kuma on a different server from n8n.
Sources
- Healthchecks.io docs: pinging API
- Healthchecks.io docs: configuring checks
- Healthchecks.io pricing
- UptimeRobot pricing
- n8n docs: node settings
- Uptime Kuma on GitHub
Next step: run through the free checklist of 12 silent failures on one client account this week.