Quick overview
This workflow runs hourly to monitor selected n8n workflows via the n8n API, detecting missing executions, recent errors/crashes, and (optionally) successful runs that output zero items, then alerting you by email and optionally posting to Slack.
How it works
- Runs every hour on a schedule.
- Loads the watchdog configuration, including the workflow IDs to watch, the silent window, and alert settings.
- Splits the configured workflow ID list and queries the n8n API for the most recent executions for each workflow.
- Analyzes executions to flag workflows with no runs in the configured time window, any recent error/crashed runs, and (optionally) successful runs whose last executed node output zero items.
- When issues are found, sends an alert email with a timestamped summary and issue count.
- If Slack alerts are enabled, posts the same issue summary to the configured Slack channel.
Setup
- Create an n8n API key with at least the execution:list scope (and execution:read if required) and add an n8n API credential with your instance base URL.
- Update the configuration values with your comma-separated workflow IDs, silentHours, executionsPerWorkflow limit, and alert email addresses.
- Add SMTP credentials for sending alert emails (or replace the email node with your preferred email provider).
- If you want Slack alerts, add a Slack OAuth credential and set the target channel ID, or remove the Slack steps if you won’t use them.