Save workflow from CLI after import

Hello everyone,
I need your help with the workflow import from CLI.
After the import and activation with the commands indicated below, the WorkFlow does not work, until you enter the Web-Interface and press the SAVE button in the workflow.
Can I do this from the CLI?

How can I save workflow from CLI after import?

docker exec -it -u node n8n n8n import:workflow --separate --input /data/
docker exec -it -u node n8n n8n update:workflow --all --active=true

The workflows are imported ok and the check ok is activated.
But they don’t work until you enter the WEB interface, enter the workflow and hit the SAVE button.

I appreciate the help, since it is a stop for the automation in the workflow deployment
Thanks and Regards

Hi @Matias_Furgiuele, welcome to the community!

I am so sorry to hear you’re having trouble here. I gave this a go on my side and could indeed not activate the workflows via the CLI as expected :frowning:. I got a slightly different behaviour though ( n8n update:workflow --all --active=true returning a Deactivating all workflows message), could you perhaps confirm which version of n8n you have tested this with?

We also have another open bug related to the CLI and this sounds like it might be related. I shall add your report to our internal bug tracker as well and we’ll of course get back to you as soon as this has been looked at.

Yes, the same behavior with

docker exec -it -u node n8n n8n update:workflow --all --active=true
Deactivating all workflows


docker exec -it -u node n8n n8n update:workflow --id=21 --active=true
Deactivating workflow with ID: 21

is activated, but it doesn’t work until you enter the WEB Interface and press the SAVE button.


I tried with version 175 and 178.2

1 Like

Thanks for confirming these details here @Matias_Furgiuele. Let’s hope this gets fixed soon :crossed_fingers:

1 Like

Thanks for the help and quick response.
Greetings and good week.
Thanks and Regards.

1 Like