Error in importing workflows and creds?

Hi team, @MutedJam @jan @mcnaveen

need a quick response.

I am not able to import workflows and creds.
Here is the issue,

In local also not working.
I am using the n8n version is + [email protected]

My import command is,
n8n import:workflow --separate --input=/home/xxxxxx-g/workflows/
n8n import:credentials --separate --input=/home/xxxxx-g/credentials/

Thanks.

From looking at the error message it seems you are trying to import a workflow with an empty name. How does your workflow JSON file look like? Are you able to import it manually through the UI for example?

Hi @MutedJam

I have the workflow name
My JSON looks like [{ {“id”:1,“name”:Template",“active”:true, … }].

Yes, i manually import through the CLI command in the terminal.

From today only I get these errors.

thanks.

I’ve just tried this on my private instance and the command was working for me as expected I am afraid. Do all your workflow files have a valid name?

Does the import work if you use the UI to import a workflow?
image

Can you import individual workflows rather than all of them (= the CLI command without using --separate)?

@MutedJam which version of n8n did you test?

a single file can import, but all not working. even names are valid.

I figure out only in CLI not UI.

I’ve just tested running n8n import:workflow --separate --input=/storage/ using the latest n8n version 0.168.1 (I was previously using 0.168.0) but did not encounter the error you have reported I am afraid. So I’d very much think the problem lies within one of your JSON files.

You could try moving all but one of the JSON files out of your folder, then retry the import. Then move a few files back, try importing again and so on until you identify the problematic file.

It’d then be worth taking a closer look at the problematic file to see what’s wrong with it.

Ok,

Let me check @MutedJam

HI @MutedJam,

We have done the import workflows and creds using the old version of n8n (0.161.0).
I think we export the workflows and creds in that version of n8n(0.161.0).
but for importing we use the new version of n8n (0.168.1), it won’t work.
if we tried with the 0.161.0 version of n8n for importing, it works, need to figure it out.

I heartfully thank you for the time @MutedJam

I am sorry to hear this but as mentioned was not able to reproduce the problem on my end so far. Could you provide detailed steps to reproduce this from steps? Which workflows would I need to export from which version of n8n how exactly to encounter this error? It sounds like it’s 0.161.0 from your description but I could import older workflow backups I had from that version just fine. So I wonder if this is workflow specific?

Do all the workflows have a name in the json?

Yes, @Jon,

We did the same. All the workflows have names in the JSON.

Thanks.

Can you try them one at a time and see if it is only a few that fail?

Yes @Jon

I checked with one at a time. it’s worked but for all not working.

Thanks.