Quick overview
This workflow monitors selected n8n workflows via the n8n public API to detect “silent failures” such as empty successful runs, missed schedules, switched-off workflows, and missing expected records, then sends alerts to Slack and email and logs findings to Google Sheets.
How it works
- Runs every 15 minutes to check watched workflows, sends a daily Slack summary at 8am, and also supports a manual test run with sample data.
- Reads your monitoring configuration, including the n8n base URL and a JSON list of workflows to check and their thresholds.
- For each configured workflow, calls the n8n API to fetch the workflow status (active/inactive) and its recent executions, and optionally calls a separate “record check” URL to count expected records.
- Evaluates recent executions to flag empty successful runs (too few items past a specified step), missed schedules (no execution within the allowed gap), inactive workflows, missing records at the check URL, and optionally failed runs.
- Deduplicates findings so each unique problem is only reported once, while also tracking check activity for the daily summary.
- Sends a bundled alert to Slack and an email with links to the affected workflows/executions, and appends each finding as a new row in a Google Sheets log.
Setup
- Enable the n8n public API, create an n8n API key, and add an HTTP Header Auth credential (for example
X-N8N-API-KEY) for the n8n API requests.
- Update the Config values, especially
n8n_base_url, slack_webhook_url, alert_email, from_email, lookback_hours, and checks_json with your real workflow IDs, node names to count, and schedule/record thresholds.
- Create a Slack incoming webhook and add its URL to the Config.
- Configure an SMTP email credential for the email alert step.
- Connect Google Sheets OAuth credentials, set the target spreadsheet ID, and ensure it has a tab named “Silent failures” for appending log rows.