n8n_diff_workflow
Compare a workflow's current state against a snapshot (file or inline) and return a structured semantic diff of nodes added, removed, or modified.
Instructions
Compare a workflow's current state against a snapshot (file path or inline object). Returns a structured semantic diff: nodes added/removed/modified (with per-node field paths), plus name/connections/settings change flags. Snapshot accepts both n8n_save_workflow backup shape (flat) and n8n_get_workflow(includeDefinition=true) shape (nested). Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Workflow id to fetch as the 'after' side of the diff. | |
| snapshotPath | No | Path to a JSON snapshot file (e.g. n8n_save_workflow backup). MUST resolve inside the configured backupDir (default ~/.n8n-backups); paths outside it or with `..` traversal are rejected. Use this OR `snapshot`. | |
| snapshot | No | Inline snapshot object — accepts the flat backup shape OR the nested n8n_get_workflow(includeDefinition=true) shape. Use this OR `snapshotPath`. | |
| ignoreCosmetic | No | Suppress position-only and webhookId-only node changes (default true). | |
| maxModifiedDetails | No | Cap on per-node modification entries returned in `diff.nodesModified` (default 50). Counters in `summary` are NOT capped. |