n8n workflow template · 10 nodes · Mistral AI
Organise Your Local File Directories With AI is a free n8n workflow template that starts from the Local File Trigger node and works with Mistral AI. It has 10 nodes, 3 of them AI nodes (Mistral Cloud Chat Model, Structured Output Parser and Basic LLM Chain). The notes inside the workflow say: “This workflow manipulates the filesystem. Always make backups of your files before running local workflows.” To run it, you add your own credentials for Mistral Cloud API.
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
This workflow manipulates the filesystem. Always make backups of your files before running local workflows.
Join the Discord or ask in the Forum!
Read more about local file trigger
In this workflow, we'll monitor a specific folder on disk that n8n has access to. Since we're using docker, we can either use the n8n volume or mount a folder from the host machine.
The local file trigger is useful to execute the workflow whenever changes are made to our target folder.
Read more about Execute Command node
For all Files in the root level of our selected target folder, we want them to be sorted and moved into categorised subdirectories. In this step, we'll use linux commands to get a list of files and folders currently present in the target folder.
Read more about Mistral AI
Using Mistral AI as our AI file manager, it can help us suggest which files go into which categorised subdirectory. If the subdirectory doesn't exist, Mistral can also suggest one to be created.
Read more about Execute Command node
For this step, we'll use the execute command node to execute a shellscript to move the files into their respective subdirectories.
The 10 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
Do you need somewhere to run it? Read our guide to self-hosted n8n.
We can adapt this workflow to your apps, data and process, then deploy and support it.
Contact Us