Get folderpath from /api/v1/workflows

Describe the problem/error/question

Get folderpath from /api/v1/workflows

I would imagine I am missing something but can someone guide me in the right direction. if its not possible I would like to suggest the feature.

Looking for:
when getting workflows using n8n API (/api/v1/workflows) I would imagine a new field for folderpath to show where it is stored but nothing like that exists.

Please share your workflow

HTTP API Get Workflows

Information on your n8n setup

  • n8n version: 1.91.3
  • Database (default: SQLite): postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): elestio/hetzner

hi i also need this feature to backup restore my n8n so i hope someone can point this feature already update because i also cant find the ID of all my folder

I believe workflows are stored inside the n8n db and not as files on the filesystem. If you’re looking to make backups or pull the content of workflows, have a look at this workflow to auto backup my workflows to git reading the content from the build in workflow node

You can see how to read the workflow JSON content from the “Compare Difference” code node. You can then do with this workflow json content whatever you want, save to file or push somewhere

Hi thanks for your insight but the output of get workflow node is still missing the folders id, imagine you already backup all workflow but when restore its not include the folders on it so we must mapping each workflow again to spesific folder

What do you mean by folder? As I mentioned, the workflows do not live in folders, but in the database iteself. Are you referring to the folder feature n8n added with the license thing where you can place workflows in hypothetical folders on n8n?

yes im pointing for that folder thing so it become useful to batch many workflow based on tag to spesific folder with API

Ahh ok im not too sure. Might be worth digging around in the n8n db and seeing how they store this. I’ll need to set that up and check

1 Like