What the agent does
This is for an online store whose operations run on n8n workflows: new orders copied to the warehouse's system, tracking numbers written back to the store, review-request emails a week after delivery, a nightly stock sync. When one of them fails at 2 a.m., n8n records an execution with status error and nobody looks until a customer asks where their parcel is. The agent reads those failures every morning. It connects to the store's own n8n through n8n's instance-level MCP server: someone turns on Settings > Instance-level MCP in n8n, enables the workflows the agent should see, and connects once with POST /me/connections {"type": "mcp", "name": "n8n", "url": "https://yourstore.app.n8n.cloud/mcp-server/http", "auth": {"mode": "oauth"}}, approving the client on n8n's own page.
The run calls get_instance_context once for a snapshot of the workflows and recent runs, then search_workflow_executions with status set to error and crashed and startedAfter and startedBefore covering the last 24 hours, following nextCursor until the list ends. For each failed execution it calls get_workflow_execution with includeData on and truncateData set, so it gets the run's data without pulling every item through, and finds the node that stopped and the message it left. get_workflow_details with detailLevel set to execution gives the workflow's trigger without its whole node graph.
It groups failures by workflow and by cause, because twenty failures of the order sync with the same 401 from the warehouse API are one problem, not twenty. For each group it checks whether the workflow changed recently: get_workflow_history lists saved versions newest first, and get_workflow_versions_diff shows which nodes a version added, removed or modified, so a failure that started right after an edit says which edit. It also checks whether a later execution of the same workflow succeeded, which tells the team whether the problem is still live.
From each failed execution's input it pulls the identifiers a person needs: the order number, the customer email's domain, the SKU. It lists those per group so the operations lead can fix each order by hand or re-run it deliberately. It never calls execute_workflow or test_workflow, and publishes nothing: re-running an order workflow can ship a parcel twice or email a customer twice, and that decision stays with a person.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Review failed n8n executions from 2026-11-12T06:00:00Z to 2026-11-13T06:00:00Z. Call get_instance_context once. Then search_workflow_executions with status error and crashed in that window, following nextCursor. For each execution call get_workflow_execution with includeData true and truncateData true, and find the node that stopped and its error message. Group failures by workflow and cause. For each group: say whether a later execution of that workflow succeeded, and whether get_workflow_history shows a version saved in the 48 hours before the first failure (if so, summarise get_workflow_versions_diff between it and the version before). List the order numbers, SKUs or other ids in each failed execution's input. Write failures.md, most orders affected first. Do not call execute_workflow, test_workflow, publish_workflow or unpublish_workflow, and change nothing in n8n.",
"connections": [
"n8n"
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
failures.md comes back as an artifact on the session. It opens with a short table: workflow, cause, number of failed executions, first and last failure time, and whether it has recovered. A section per group follows with the failing node, the error message as n8n recorded it, the recent edit if there was one, and the list of orders or items to handle by hand. The session's result is a two or three line summary that fits in a chat message.
The operations lead reads the still-failing groups first. A cause the agent names, such as an expired credential or a changed field name in the warehouse API's response, is a lead, not a verdict: they open the execution in n8n, confirm it, fix the credential or the node, and then decide order by order whether to re-run. A morning with no failures produces a one-line file saying so.
n8n renamed these tools in version 2.34.0 (get_execution became get_workflow_execution, search_executions became search_workflow_executions), so an older self-hosted instance answers to the old names. The prompt names the new ones; on an older instance, update n8n or adjust the prompt.
Run it on every every morning
In the console, a Project automation with a schedule trigger (0 6 * * * with the store's timezone) can run a saved agent that names the n8n connection and holds the rules above, with the prompt asking for the previous 24 hours. Its notify_each_run setting decides whether each morning's result reaches the person who set it up on its own or in one daily Slack message.
A store that wants to hear sooner can add n8n's own error workflow, which runs when another workflow fails, and have it POST to a Rush webhook trigger's URL with an Authorization: Bearer header holding the trigger's secret, since n8n's HTTP Request node sets headers. The failed workflow's name and execution id arrive as the event after the prompt.
The use case this job follows, with its automation and trigger: Produce a report or file, no repo.
Why run it on Rush?
n8n already shows failed executions in its own list, but someone has to open each one, scroll to the red node, and work out whether twenty failures are one problem. The agent does that reading and joins it to the workflow's version history, which is where most overnight breakages come from. The n8n sign-in stays in Rush's connection, scoped to the workflows the store enabled for MCP, not a personal API key pasted into a cron job.
Each run has its own computer, a transcript of every MCP call it made and its cost, so when a failure summary is wrong the team can see which execution the agent read. Because the instructions forbid re-running anything and the run's transcript would show any such call, the store can let it read production executions without worrying it will replay an order.
Frequently asked questions
Does it work with self-hosted n8n?
Yes, if the instance is reachable from the internet over HTTPS and has instance-level MCP turned on. The connection takes your instance's address in place of the n8n Cloud one, and the tool names above need n8n 2.34.0 or later.
Can it see workflows we did not enable for MCP?
n8n's search_workflows returns previews of every workflow the user can view, but running or changing a workflow needs it enabled for MCP. Enable the workflows you want reviewed, and leave sensitive ones off.
Could it fix the failing node itself?
n8n's MCP server has workflow-building tools, so it could, but this agent's instructions keep it read-only. A safer next step is a second agent that drafts the fix as a new version for a person to review and publish in n8n.
Will reading execution data expose customer details?
The agent reads what n8n stored for the execution, which can include customer emails and addresses. The prompt asks it to list order numbers and email domains only, so failures.md carries no addresses, but the transcript holds what the tools returned, so treat the session as containing customer data.
More n8n jobs
More jobs like this: Produce a report or file, no repo
- Which Feature Flags Changed or Were Left On This Week? A Restaurant-Ordering Software Company's Monday Flag Review on Railway (Railway)
- Did Our Public API Examples Break Overnight? An API Company's Postman Monitor Review (Postman)
- Audit Row-Level Security in a Supabase Project (Supabase)
- Schedule a Week of Social Posts in Buffer (Buffer)
- Run a Security Audit on an Angular App (Angular)