See llms.txt for all machine-readable content.

Back to Templates

Alert on consecutive empty workflow runs with email and Slack

Quick overview

A filter or a changed API can make a workflow succeed while processing nothing. One empty run is often normal; three in a row usually is not.

How it works

  1. This workflow calls GET /api/v1/executions?includeData=true&status=success for each workflow you list, counts output items on a chosen node (or the last node that ran), and alerts only when the last N consecutive successful runs all output fewer than minItems items (defaults: 3 runs, 0 items). A later run with data, or a run whose execution data is missing, stops the streak, so a single empty success does not page you.
  2. Alerts go out by email, and optionally Slack, with execution IDs and links. If everything is under the threshold, it stays quiet.

Setup

  1. Import zero-items-alert.json.
  2. Create an n8n API key (Settings → n8n API) with execution:list and execution:read. Add an n8n API credential whose Base URL includes /api/v1, and select it on Get Executions.
  3. In Zero-Item Config set: n8nBaseUrl: your instance origin, without /api/v1 (used to build execution links); workflowIds: comma-separated IDs from each workflow URL; consecutiveEmptyRuns (default 3) and minItems (default 1, i.e. alert on 0 items); countNode: leave blank to use the last executed node, or enter an exact node name; executionsPerWorkflow, alertEmailTo, alertEmailFrom, and optional Slack settings
  4. On each watched workflow, turn on saving successful production executions.
  5. Add SMTP credentials. Either add a Slack credential or delete Slack Enabled? and Send Slack Alert.
  6. Run once manually, then publish/activate. The trigger runs every hour.

Additional info

For hosted outcome monitoring across all client workflows, try LeadPulse's free Health Check: https://leadpulseops.com/health-check