推出自愈式工作流
Introducing Self-healing workflows
导读
n8n 博客介绍了自愈工作流(Self-healing workflows):在项目设置中启用后,当已发布的工作流在生产环境执行失败时,n8n Assistant 会在后台排查原因并尝试起草修复方案,把说明和改动 diff 送进收件箱,需经审阅者确认后才发布。该功能以预览形式从 n8n 2.50.5 起提供,依赖 n8n Assistant,任何改动都不会自动上线,工作流、版本历史与决定权仍留在团队手中。
正在把原文翻译成中文,长文需要一两分钟;先显示原文。
If you run workflows in production, you know how this goes. An error notification lands, or someone asks why the CRM hasn’t updated since Tuesday. Then the routine starts: find the execution, read the error, work out which node broke and why, change it, test it, publish it again.
None of that is especially hard. It just tends to happen at the worst possible time, often to whoever is around rather than whoever built the workflow, and it always starts from zero. That’s a bit odd, because n8n already has everything needed to get going: the error, the execution data and the workflow itself.
With self-healing workflows, n8n Assistant picks up that first stretch for you. Turn it on for a project, and when a covered workflow fails in production, n8n Assistant investigates in the background, tries to work out what went wrong and, where it can, prepares a fix. You’ll find it in your Inbox with an explanation and a diff of exactly what it wants to change.
Nothing is published until someone reviews it and says yes.

Why a person still makes the call
“AI that fixes your workflows” is easy to say. Letting it loose on production is a different conversation. A workflow that quietly changes itself raises questions nobody wants to answer after the fact:
- Who changed it? If a fix lands at 3am and something else breaks at 9, you need to know it was n8n Assistant and not a colleague.
- What exactly changed? “It’s fixed now” isn’t enough when the workflow touches customers, money or data you care about.
- Was it actually fixed? A change that makes an error go away isn’t the same as one that makes the workflow do the right thing.
So self-healing doesn’t publish anything by itself. It does the investigation and drafts a fix where it can, then hands over to a person with the context they need to decide quickly. The workflow, its version history and the decision stay with your team.
How it works
- Choose what to cover. In Project settings → Self-healing, (or the Self-healing tab in a personal project), add a configuration, pick all workflows in the project or just the ones you care about, and choose who reviews the results. You can pause a configuration at any time.
- A workflow fails in production. When a covered, published workflow has a failed production execution, Assistant starts an investigation in the background. Manual test runs and evaluations don’t trigger it.
- Assistant investigates. It reads the error and the execution data, works out the likely cause, drafts a change and checks it where it can.
- A review lands in your Inbox. Reviewers see what failed, what Assistant found, what it wants to change and what it was able to verify.
- You decide. Apply and publish, open it in the editor to keep working (this saves the changes to the latest version without publishing), or discard it. If it needs your input, you can keep working on it with Assistant or dismiss it.
What you’ll see in a review
- Fix ready: it found the likely cause and has a change for you to review, with a diff of the affected nodes.
- Needs attention: it got part of the way but needs something from you, like a credential it can’t access or a decision only you can make. You can pick up the conversation with Assistant from there.
- Could not fix: it explains what it tried and what it ruled out, so you’re still not starting from scratch.
If a fix touches more than one workflow in the same project, you can review the changes together.
A quick example
Say you have a workflow that pulls new orders from your store every hour and adds them to a spreadsheet. One morning the store’s API renames a field, an expression starts returning nothing, and the next node fails.
Assistant picks up the failed execution, compares the data it expected with the data that arrived, and traces the problem to the renamed field. It drafts a fix to the expression, checks the change against the failed execution’s data, and leaves a Fix ready review with a one-node diff. Whoever is on review reads the explanation, agrees, and clicks Apply and publish. The next scheduled run goes through.
It wasn't a hard fix. But usually someone has to stop what they're doing to track it down, and this time nobody did.
What it costs
On n8n Cloud, investigations run on your plan's AI credits, the same allocation n8n Assistant uses. On self-hosted, they use your own AI provider's tokens.
Availability
Self-healing is available as a preview from n8n 2.50.5. It requires n8n Assistant and is available on:
- n8n Cloud: Starter and Pro
- Self-hosted: Community, Registered Community and Business
It isn't available on Enterprise plans right now.
Self-healing needs saved production executions, because n8n Assistant investigates using the failed execution's data. Expect it to change as we learn from how you use it.
What it doesn’t do
- It won’t fix everything. Some failures need a person: an expired account, a changed business rule, a service that’s simply down.
- It doesn’t create or change credentials or data tables. If the fix needs a new credential, it tells you and stops there.
- Its checks have limits. Assistant tests its work where it can, but a check that couldn’t use real credentials isn’t proof the fix works in production. The review shows what was and wasn’t verified.
- It stays inside the project. With "Include sub-workflows" turned on, it can propose fixes to sub-workflows in the same project, but it can't repair ones that live in another project.
- It doesn’t publish on its own. That one’s deliberate.
Get started
Pick one or two workflows that matter and fail every now and then. Turn on self-healing for them, add yourself as a reviewer, and wait for the next failure. If you’re impatient, publish a test workflow with a deliberate mistake and trigger a production execution. Manual test runs don't count.
Good places to start:
- Workflows that call third-party APIs that change without much warning
- Scheduled syncs nobody looks at until they stop
- Workflows built by someone who’s since moved on to other things
Read the self-healing documentation: https://docs.n8n.io/build/manage-workflows/self-healing-workflows
While it’s in preview, the most useful feedback is the specific kind: the error, what n8n Assistant suggested, and whether you’d have shipped it. We’re reading the community forum thread closely.
n8n users come from a wide range of backgrounds, experience levels, and interests. We have been looking to highlight different users and their projects in our blog posts. If you're working with n8n and would like to inspire the community, contact us 💌
出处
- S 官方n8n Blog · RSS阅读原文 ↗
Introducing Self-healing workflows