Github N8N Backups: How to backup workflows with folder structure instead of tags?

I’m using a backup workflow to export my n8n flows as JSON files, but I’m running into an issue. The backup saves the workflows organized by their tags rather than preserving the folder structure I’ve carefully created in the n8n interface.

For example:

Is there a way to export/backup workflows while maintaining the actual folder hierarchy from the n8n UI? I’d prefer my backups to mirror the folder organization rather than the tag structure.

Information on your n8n setup

  • n8n version: 1.99
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker, GCP
  • Operating system: Windows 11
1 Like

hello @Kiremit
I think you can’t get the folder structure from the API. Seems currently it exists only in the DB.

You also shouldn’t rely on tags, as each WF may have more than one tag plus they are unordered within a workflow