{"name":"Example: Hourly Failed-Event Alert","note":"Example workflow on fictional data. Review and configure before running; no client data or credentials are included.","active":false,"nodes":[{"id":"hourly-failed-event-alert-0","name":"Hourly check","type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2,"position":[0,120],"parameters":{"rule":{"interval":[{"field":"hours","hoursInterval":1}]}}},{"id":"hourly-failed-event-alert-1","name":"Read failed events","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[220,120],"parameters":{"method":"GET","url":"https://example.invalid/events?status=failed&window=last-hour","options":{"timeout":10000}},"onError":"continueRegularOutput"},{"id":"hourly-failed-event-alert-2","name":"Build digest","type":"n8n-nodes-base.code","typeVersion":2,"position":[440,120],"parameters":{"jsCode":"if($json.error) return [{json:{shouldAlert:true,subject:\"Event feed unavailable\",details:$json.error}}]; const events=$json.events??[]; const unique=[...new Map(events.map(e=>[e.eventId,e])).values()]; return [{json:{shouldAlert:unique.length>0,subject:\"Failed-event digest\",events:unique}}];"}},{"id":"hourly-failed-event-alert-3","name":"Needs attention?","type":"n8n-nodes-base.if","typeVersion":2,"position":[660,120],"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"condition","leftValue":"={{ $json.shouldAlert }}","rightValue":true,"operator":{"type":"boolean","operation":"true","singleValue":true}}],"combinator":"and"},"options":{}}},{"id":"hourly-failed-event-alert-4","name":"Send owner digest","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[880,40],"parameters":{"method":"POST","url":"https://example.invalid/alerts","sendBody":true,"specifyBody":"json","jsonBody":"={{ JSON.stringify($json) }}","options":{"timeout":10000}},"onError":"continueRegularOutput"},{"id":"hourly-failed-event-alert-5","name":"No failed events","type":"n8n-nodes-base.code","typeVersion":2,"position":[880,240],"parameters":{"jsCode":"return [{json:{status:\"no-failed-events\"}}];"}}],"connections":{"Hourly check":{"main":[[{"node":"Read failed events","type":"main","index":0}]]},"Read failed events":{"main":[[{"node":"Build digest","type":"main","index":0}]]},"Build digest":{"main":[[{"node":"Needs attention?","type":"main","index":0}]]},"Needs attention?":{"main":[[{"node":"Send owner digest","type":"main","index":0}],[{"node":"No failed events","type":"main","index":0}]]}},"settings":{"executionOrder":"v1"},"pinData":{},"tags":[],"meta":{"trigger":"An hourly schedule checks the failed-event queue.","systems":["n8n","Failed-event API","Owner notification webhook"],"beforeRunning":["Replace the queue and owner-notification endpoints and configure credentials.","Choose the schedule, timezone and failed-event fields for your receiving system.","Add a last-seen checkpoint and test empty queues, read errors and notification errors."],"example":true,"slug":"hourly-failed-event-alert","notes":["Dedupe key: eventId collapses repeats inside each hourly digest.","Window: the example feed contract returns failures from the previous hour.","Retry: none automatically; an unavailable feed also raises an alert.","Error branch: feed errors become a digest so missing data stays visible.","Alert: one owner digest; delivery failures remain in the execution log."],"description":"Hand-authored example on fictional data. Not an export from a client system. Replace illustrative endpoints and add credentials before use."}}