Test and self-heal a workflow
self_heal_workflowRuns the workflow for real on your n8n, reads back the actual result,
and either proposes a fix for review (mode "suggest", the default) or
fixes and re-tests up to max_iterations times (mode "auto"). Running
can have real side effects (messages, emails) -- ask the user first.
Args:
workflow_id: The deployed workflow's id.
workflow_json: Its current JSON (starting point for fixes).
original_prompt: What it is meant to do, if known.
mode: "suggest" or "auto".
max_iterations: Fix/re-test attempts (hard max 5).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workflow_id": "<workflow_id>",
"workflow_json": "<workflow_json>"
},
"name": "self_heal_workflow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | suggest | |
| workflow_id | Yes | ||
| workflow_json | Yes | ||
| max_iterations | No | ||
| original_prompt | No |