Actions44
- Execution Actions
- Monitoring Actions
- Scheduler Actions
- Tag Actions
- Workflow Actions
Monitoring → Smart Alerts
AI-generatedSummary
Scans recent executions of one or more n8n workflows via the n8n API and returns a per-workflow list of alerts (high failure rate, consecutive failures, still-active executions) with a health score.
Inputs
- workflowSelectionMode — How to pick workflows: searchable list (single), multiple from list, current workflow (must be saved), or manual URL/ID(s) (comma-separated). Default: list.
- workflowId (required) — Single workflow when selection mode is list.
- workflowIds — Multiple workflows when mode is multiple.
- workflowIdManual — Workflow URL(s) or ID(s), comma-separated, when mode is manual.
- executionStatus — Restrict analyzed executions to Error, Running, Success, or Waiting; Any (default) uses all. Note that filtering changes the failure-rate math (e.g. Success-only yields 0% failures).
- failureRateThreshold — Percent (0–100, default 25). An alert fires when the failure rate in the fetched window is at or above this.
- consecutiveFailureThreshold — Number of newest-first back-to-back failed runs (1–50, default 3) that triggers an alert.
- includeHealthyWorkflows — If true, also return workflows with no alerts. Default false (only workflows with alerts are returned).
- maxPages — Max pages of executions fetched per workflow (1–50, default 5; up to 100 executions per page), bounding the analysis window.
Output shape
A single item with generatedAt (ISO timestamp) and an alerts array. Each entry has workflowId, workflowName, healthScore (0–100), and alerts (array of strings such as 'Failure rate is 40.0%.', 'N consecutive failures detected.', 'N execution(s) still active.').
Read-only; no workflows are changed. Only workflows with at least one alert are listed unless Include Healthy Workflows is on. Failure statuses counted are error, crashed and failed. Health score is derived from failure rate, consecutive failures and running count. The alert window is limited by Max Pages. Requires n8nApi credentials. Errors fail the item unless Continue On Fail is set.
Examples
Example 1: Scheduled check that posts to Slack when any production workflow is failing.
Workflow Selection: Multiple From List (production workflows); Failure Rate Threshold 25; Consecutive Failure Threshold 3; Include Healthy Workflows off. Follow with an IF node on alerts length.
Example 2: Full health report across a few workflows including healthy ones.
Workflow Selection: By URL or ID with comma-separated IDs; Include Healthy Workflows on; Max Pages 10.