Easiest thing would be to create a workflow to grab all workflows with the n8n node. update the JSON and update the workflows with the n8n node again.
Other thing would be to construct some kind of Postgres query doing the same in the workflows table of the n8n database.