N8n 2.32.7 — Cannot restore published workflow because historical nodeGroups is stored as string

I’m using n8n 2.32.7, self-hosted with Docker.
One workflow has an intact published version containing 9 nodes, but its current draft has 0 nodes.
Opening the editor previously caused:
e[n].map is not a function
Attempting Restore version returns:
ResponseError: Expected array, received string
Our investigation confirmed that nodeGroups in the historical published version is stored as a string, while the restore schema expects an array. The restore operation does not deserialize that field.
The current pinData is an object. We have a validated, corrected JSON backup containing all 9 original nodes, IDs, connections and parameters.
We need a supported recovery procedure that restores the draft without replacing the published workflow, changing its workflow ID, losing node IDs or disrupting its active triggers.
Could you advise on a safe recovery procedure or confirm whether this is a known issue?
We can provide sanitized schema diagnostics and reproduction details without sharing credentials or customer data.

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @pedro0401, avoid using the public API’s PUT /api/v1/workflows/{id} for this recovery on 2.32.7. Its update handler hardcodes publishIfActive: true, so a successful update would re-publish an already published workflow. Adding publishIfActive=false to the query does not change that in this release.

One distinction to check before repairing data: are you using SQLite or PostgreSQL, and is nodeGroups a string in the decoded history API response, or only in the database column? SQLite stores these JSON fields as text by design.

Please share just the nodeGroups field from the history response and the failed Restore request body, preserving whether it is [] or "[]". No node parameters or customer data are needed.

I couldn’t verify a released fix for this exact failure. Those diagnostics would support a precise bug report and a request for a draft-only recovery that preserves your existing workflow ID and published version.