How to convert string into n8n json workflow compatible?

Describe the problem/error/question

I exported a workflow and copied the json and then pasted the text into a Edit Fields node. I then converted into a string so I could use replace text within the string. I converted the string back into json but I can’t import the workflow into n8n since it’s not a proper json file. How can I convert the string into a compatible json file for it be imported into n8n?

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

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

Hi @Ruriko,

Try this workflow. Key changes:

Dont try and parse the json

I used the json mode for the last set node

For the convert to file node, use the Mode: “Each item to separate file”, otherwise it trying to create a json file with an array inside instead of the single json object

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.