Quick overview
This workflow runs every 6 hours to audit your n8n instance by listing active workflows, reviewing their latest execution history, and compiling a health report, optionally sending alerts to Telegram when failures, repeated errors, or overdue runs are detected.
How it works
- Runs every 6 hours on a schedule trigger.
- Uses the n8n API to list all active, non-archived workflows and excludes the monitor workflow itself.
- Iterates through each workflow, fetching its metadata and the last five executions from the n8n API.
- Analyzes execution statuses to flag workflows that have a failed last run, repeated recent failures, or an overdue expected run interval (if configured).
- Builds a consolidated health report summarizing checked workflows and any alert details, including failed node and sanitized error message when available.
- Sends the report to Telegram when at least one workflow requires attention.
Setup
- Create or select an n8n API credential with read access to workflows and executions, and assign it to the n8n API steps.
- (Optional) Configure a Telegram bot credential, replace the chat ID, and enable the Telegram step to receive alerts.
- (Optional) Define expected run intervals by workflow ID in the assessment code to enable inactivity/SLA alerts.
- Execute the workflow once to validate the generated report, then activate it to run automatically every 6 hours.