Stripe to HubSpot sync failed 14 times overnight
19 executions failed across 3 workflows since yesterday. Stripe to HubSpot sync is still failing on the HubSpot node with a 401.
Every morning: n8n workflows with failed executions since yesterday, how many times each failed, the error message and the node it stopped on.
What lands on your board
19 executions failed across 3 workflows since yesterday. Stripe to HubSpot sync is still failing on the HubSpot node with a 401.
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.
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.
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}.
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.
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.
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.
With BRIEFKIN_TOKEN set, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.
Pick your agent, where the data comes from and how to schedule it; the commands below follow.
One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.
shellcurl -fsSL https://briefkin.dev/skills/n8n-failed-executions-report/install | shAsk Claude Code:
promptRun the n8n-failed-executions-report skillOr paste the prompt instead of installing:
promptUsing the n8n public API at <instance>/api/v1 with my API key (read only), list executions with status error, paging with the cursor until startedAt is older than 24 hours (the endpoint has no date filter). Group them by workflow and get each workflow's name. For the newest failure of each workflow, fetch the execution with includeData=true and give the error message and the node it stopped on (data.resultData.error, data.resultData.lastNodeExecuted). Then check whether that workflow had a successful execution after its last failure. List workflows that are still failing first, with the failure count, node, error and a link to the execution, then the ones that recovered. Suggest a likely cause when the error makes it clear. Do not retry or change any workflow.Every day at 8:00, from cron on any machine where Claude Code is signed in:
crontab0 8 * * * claude -p "Run the n8n-failed-executions-report skill"Add it with crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.
Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a report card. How setup works
SKILL.md---
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
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.
/mcp-server/http. In Claude Code: claude mcp add --transport http n8n https://<your-n8n-domain>/mcp-server/http, then /mcp to sign in with OAuth, or add --header "Authorization: Bearer <token>" with the personal MCP token from the same settings page. In Codex, codex mcp add n8n --url https://<your-n8n-domain>/mcp-server/http and codex mcp login n8n; for Cursor, use the one-click setup in n8n's Connect a client dialog (docs). n8n is also in Claude's connector directory. Clients see only the workflows you enable for MCP (search returns previews of the rest), and with the right grants they can run, build and edit workflows.N8N_API_KEY with N8N_BASE_URL, and send it in the X-N8N-API-KEY header. The API isn't available during n8n Cloud's free trial.API key scopes are an Enterprise feature: there, give the key read access to workflows and executions only; on other plans a key has full access to your account. When you connect an MCP client for reporting, grant it read access without run or edit rights.
No. Runs you start from the editor can be saved too, but they carry mode manual, and the skill leaves them out so a test that failed while you were building does not look like a broken production workflow.
Workflows can be set not to save failed production executions, and n8n prunes old executions after the retention period you configured. If a workflow you know failed is absent, check its settings under Workflow settings > Save failed production executions.
No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a report card, so you can glance at it instead of asking again.
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.
Yes. Switch the data source to "Your browser" and the steps change to the n8n pages themselves: the agent opens app.n8n.cloud in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.
Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.
Free during the open beta. No card.