Bulk Export/Download, Scheduled Backups

I’m up to about 20 workflows and looking for a way to macro backups, possibly with versioning. Dropbox/FTP/Zip menu option or maybe an Export node to create workflows with

You want to download it via the CLI? Because via the REST API the UI uses it should already be possible.

Sure via CLI would work

The question was actually more if also via REST API would work as that is already possible :wink:

That works too lol

Is there documentation on it?

No sadly not as it was not planned to be used by anything else than the UI. So be also aware that it will may change in the future. But for now what you can do is to simply make a GET request like this:

curl http://localhost:5678/rest/workflows/1

Simply replace the host, port, and workflow-id (which is 1 in the example below) accordingly.

1 Like

This will do for the time being. Thanks :smiley:

Great to hear that it helps. Anyway, let’s keep that open to add proper support for it later once I have some time.

1 Like

If there was one more endpoint to list all workflow IDs and names in json I think that would be perfectly functional for foreseeable future

But for now this allows me to take advantage of Dropbox versioning as long as I remember to add additional logic with each workflow I create

I appreciate your time and everyone who’s been contributing :heart_eyes:

Ah yes, there is. If you simply leave out the workflow ID and it will return that information. So like his:

curl http://localhost:5678/rest/workflows

Happy to be of service!

1 Like

Ah ha! You’ve thought of everything :smiley:

Was actually more if a necessity :wink: That is the endpoint the UI uses to displays the workflows in the “Open Workflow” dialog.

Here are the workflows if anyone is interested

https://n8n.io/workflows/174 (Dropbox)
https://n8n.io/workflows/175 (Nextcloud)

Very convenient :heart_eyes:

1 Like

Anyone using these workflows, please update.

I optimized it and fixed a bug where irrelevant JSON was being stored preventing copy/paste