---
name: n8n-failed-executions-report
description: "Every morning: n8n workflows with failed executions since yesterday, how many times each failed, the error message and the node it stopped on. Use when the user asks for this, or when it runs on a schedule."
---

# n8n failed executions report

Every morning: n8n workflows with failed executions since yesterday, how many times each failed, the error message and the node it stopped on.

An n8n workflow that fails at 2 a.m. leaves a red row in the Executions list and nothing else, unless someone built an error workflow for it. The CRM sync that broke on Tuesday is noticed on Friday, when a salesperson asks why their leads stopped arriving.

The agent reads failed executions from the n8n public API, groups them by workflow, opens the latest failure of each to find the node and the error message, and checks whether a later run succeeded. You get the short list of automations that are actually broken right now.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- An n8n API key (Settings > n8n API) in `N8N_API_KEY` and the instance URL in `N8N_URL`. The API is on n8n Cloud Starter and above and on every self-hosted edition, not on the free trial.
- Failed production executions must be saved, which is the default setting.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **List failed executions** (n8n): `GET <instance>/api/v1/executions?status=error&limit=250` with the `X-N8N-API-KEY` header. Results are newest first; follow `nextCursor` until `startedAt` is older than 24 hours, since the endpoint has no date filter. Runs that crashed without a normal error are returned with the error status too.
2. **Group by workflow** (n8n): Drop executions whose `mode` is `manual` (test runs from the editor), count the rest per `workflowId` and get each name from `GET /api/v1/workflows/{id}`.
3. **Read the latest error** (n8n): For the newest failure of each workflow, `GET /api/v1/executions/{id}?includeData=true` and read the error message from `data.resultData.error` and the node from `data.resultData.lastNodeExecuted`.
4. **Check for recovery** (n8n): `GET /api/v1/executions?workflowId=<id>&status=success&limit=1` returns the newest success. If its `startedAt` is after the last failure, the workflow recovered on its own, often a timeout or rate limit.
5. **Report**: Still-failing workflows first, with failure count, node, error message and a link to the execution (`<instance>/workflow/<workflowId>/executions/<id>`); recovered ones after in one line.

## Route B: the browser

### What you need

- Signed in to the n8n instance as an owner, admin or member with access to the projects whose workflows you want, since the Executions tab only shows workflows you can open.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://app.n8n.cloud/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Open your instance's executions list**: The n8n Cloud dashboard lists your instances; open one, or type your self-hosted URL. In the instance, go to **Overview** and the **Executions** tab, which shows every saved execution across workflows, newest first.
2. **Filter to failures since yesterday**: Click **Filters**, set **Status** to `Error` and **Execution start** to yesterday morning onward. Each row has the workflow name, status, started time, run time and the execution ID; count rows per workflow. Rows whose mode is manual are test runs from the editor; leave them out.
3. **Open the newest failure of each workflow**: Click the row. The execution opens in the editor in read-only mode with the failing node outlined in red; click that node to read the error message and the node name in the output panel. Note the URL, which is the link for the report.
4. **Check for a later success**: Open the workflow itself and its **Executions** tab, set **Status** to `Success`, and see whether a run started after the last failure. If so, the workflow recovered and only needs a mention.
5. **Report**: Still-failing workflows first with failure count, node, error and link, then recovered ones in one line, with the likely cause where the error says it (expired credential, rate limit, a missing field).

Note: The Executions list only contains runs the workflow was set to save; the default saves failed production runs. Long lists load in pages as you scroll, so for more than a few hundred failures filter by workflow instead. Self-hosted instances on http:// work the same way but the agent may warn about the insecure page.

## The report

- **Failing now**: workflow, failures since yesterday, the node and error message, link to the latest execution.
- **Recovered**: workflows that failed and then ran successfully.
- **Counts**: failed executions and affected workflows.
- One line on the likely cause where it is obvious (expired credential, rate limit, changed field).

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "n8n-failed-executions-report/<date of this run, e.g. 2026-10-16>",
  "item_key": "n8n-failed-executions-report",
  "project": "acme-automations",
  "source": "n8n failed executions report skill",
  "kind": "update",
  "title": "Stripe to HubSpot sync failed 14 times overnight",
  "summary": "**19** executions failed across **3** workflows since yesterday. **Stripe to HubSpot sync** is still failing on the HubSpot node with a 401.",
  "work_state": "failed",
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Workflow",
          "Failures",
          "Node",
          "Error",
          "Now"
        ],
        "align": [
          "left",
          "right",
          "left",
          "left",
          "left"
        ],
        "rows": [
          [
            "Stripe to HubSpot sync",
            14,
            "HubSpot: Update deal",
            "401 Unauthorized: token expired",
            "Failing"
          ],
          [
            "Daily invoice digest",
            3,
            "Gmail: Send",
            "Rate limit exceeded",
            "Recovered at 07:10"
          ],
          [
            "Typeform to Slack",
            2,
            "Code",
            "Cannot read properties of undefined (reading 'email')",
            "Failing"
          ]
        ]
      }
    },
    {
      "type": "Callout",
      "props": {
        "text": "The HubSpot credential expired at 23:05. Reconnect it under Credentials and the sync will pick up on its next run.",
        "tone": "warn"
      }
    }
  ]
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: Every day at 8:00 (`0 8 * * *`). From cron, with the agent signed in on that machine:

```bash
0 8 * * * claude -p "Run the n8n-failed-executions-report skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/n8n-failed-executions-report#schedule

Source: https://briefkin.dev/skills/n8n-failed-executions-report
