{"product_id":"dead-man-s-switch-for-n8n-webhook-heartbeats-to-google-sheets-slack","title":"Dead Man’s Switch for n8n: Webhook Heartbeats to Google Sheets + Slack","description":"\u003ch3\u003eKeep scheduled n8n jobs honest with a Dead Man’s Switch—webhook heartbeats to Google Sheets and Slack alerts\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow acts as a \u003cstrong\u003edead man’s switch\u003c\/strong\u003e for scheduled jobs: your job sends a signed webhook \u003cem\u003eheartbeat\u003c\/em\u003e, the workflow records it in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, and it automatically \u003cstrong\u003ealerts in Slack\u003c\/strong\u003e if a job stops checking in within its expected run window.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives webhook heartbeats\u003c\/strong\u003e: It accepts a \u003cstrong\u003ePOST webhook\u003c\/strong\u003e containing a \u003cstrong\u003ejob_id\u003c\/strong\u003e and validates an \u003cstrong\u003ex-heartbeat-secret\u003c\/strong\u003e header against a configured shared secret.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates registration\u003c\/strong\u003e: It looks up the \u003cstrong\u003ejob_id\u003c\/strong\u003e in a Google Sheets \u003cstrong\u003e“jobs”\u003c\/strong\u003e registry and returns \u003cstrong\u003e404\u003c\/strong\u003e if the job is not registered.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUpdates heartbeat status\u003c\/strong\u003e: For matching jobs, it writes the \u003cstrong\u003elast_heartbeat\u003c\/strong\u003e timestamp to the row, sets \u003cstrong\u003estatus\u003c\/strong\u003e to \u003cstrong\u003eOK\u003c\/strong\u003e, and clears \u003cstrong\u003elast_alert_at\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends recovery alerts\u003c\/strong\u003e: If the job was previously in an alerting state, it posts a \u003cstrong\u003erecovery message\u003c\/strong\u003e to your configured \u003cstrong\u003eSlack\u003c\/strong\u003e channel.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDetects missed runs every 15 minutes\u003c\/strong\u003e: It periodically loads all \u003cstrong\u003eactive\u003c\/strong\u003e jobs from Google Sheets and calculates overdue jobs using \u003cstrong\u003eexpected_every_minutes\u003c\/strong\u003e plus a grace period.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePrevents alert spam\u003c\/strong\u003e: It suppresses repeat alerts using a configurable \u003cstrong\u003ere-alert window\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAlerts on overdue (missed\/never-seen)\u003c\/strong\u003e: For each overdue job, it posts a missed-run (or never-seen) alert to Slack and writes back \u003cstrong\u003elast_alert_at\u003c\/strong\u003e and \u003cstrong\u003estatus\u003c\/strong\u003e to avoid immediate re-alerting.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eConfirms receipt\u003c\/strong\u003e: The heartbeat endpoint responds with \u003cstrong\u003e200\u003c\/strong\u003e JSON including \u003cstrong\u003ejob_id\u003c\/strong\u003e and the recorded timestamp.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS operators monitoring critical background workflows (billing, sync jobs, imports) and catching silent failures early.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers ensuring scheduled n8n processes keep reporting health to a central registry.\u003c\/li\u003e\n  \u003cli\u003eTeams using Slack for on-call-style notifications when a job misses its expected run window.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e integration via a \u003cstrong\u003e“jobs”\u003c\/strong\u003e sheet (columns include job_id, job_name, expected_every_minutes, grace_minutes, last_heartbeat, status, last_alert_at, active, alert_...).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSlack\u003c\/strong\u003e node for missed-run alerts and recovery notifications.\u003c\/li\u003e\n  \u003cli\u003eWorkflow logic uses nodes including \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003eno op\u003c\/strong\u003e, \u003cstrong\u003eslack\u003c\/strong\u003e, and \u003cstrong\u003efilter\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45785712918707,"sku":"N8N-17902","price":68.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/nZ38Ym9b1qE7xPqgi2b1a_s7Rjm23W.png?v=1786180379","url":"https:\/\/buyflowscripts.com\/products\/dead-man-s-switch-for-n8n-webhook-heartbeats-to-google-sheets-slack","provider":"N8N Commerce","version":"1.0","type":"link"}