Hi everyone,
I recently ran into this and fixed it manually. Posting my findings here in case it’s not intended behavior — or in case the AI Assistant needs improving..
The Issue
I asked the n8n AI Assistant to rename a few nodes in one of my workflows. It made the edit and everything looked fine in the canvas. But right after that, the workflow became completely unsavable — every edit I made afterward failed with:
Problem saving workflow
Autosave failed: Cannot convert undefined or null to object
The browser console showed the same error firing repeatedly from the canvas renderer and the save handler:
The Symptoms (AI)
- Renaming was the only thing I asked the AI Assistant to do, but after its edit, the workflow JSON came back with several node-level fields explicitly set to
null— things likecredentials,webhookId,notes,notesInFlow,executeOnce,retryOnFail,alwaysOutputData, andonError. - Any node that didn’t need those properties normally just omits the key entirely in a standard n8n export. The AI Assistant’s edit round-trip instead wrote them out as
null. - Once that shape hit the canvas, every subsequent action (moving a node, saving, autosaving) crashed with the same
Object.keysTypeError, becausenodeTransforms.tstries to normalize those fields and doesn’t expect a literalnull.
The Root Cause (AI)
nodeTransforms.ts (used both by the canvas diffing logic and by useWorkflowSaving.ts) calls Object.keys(...) on certain node properties (like credentials) when computing the diff to save. Object.keys(null) throws, so as soon as one node in the workflow has null instead of an omitted key, saving/autosaving the whole workflow breaks — not just that node.
It looks like the AI Assistant’s node-editing path serializes the node object without dropping keys that resolved to null, which produces a technically-valid-JSON but not frontend-safe node shape.
The Solution (manually)
Export the workflow JSON, strip out any key on any node whose value is null (rather than setting it to null), and re-import. For example, on the affected nodes, remove keys like:
"credentials": null,
"webhookId": null,
"notes": null,
"notesInFlow": null,
"executeOnce": null,
"retryOnFail": null,
"alwaysOutputData": null,
"onError": null
so the node object simply doesn’t have those keys at all if it doesn’t use them. After stripping the null fields and re-importing (Import from File into a fresh workflow, not paste-into-canvas), the workflow saved and autosaved normally again.
Hope this saves someone a few hours of debugging!
This looks like a bug in how the AI Assistant serializes node edits — would appreciate confirmation from the n8n team, since anyone bulk-editing nodes with it could hit the same wall.

