Skip to content
NEWError doctor and Watchtower: failed n8n runs explained in plain words, and emailed to you. See what is new

Library / Files & Cloud Storage

Files & Cloud Storage

Sort files in a watched folder into subdirectories using Mistral AI

Runs when files change in a local folder, asks Mistral AI which subdirectory each top-level file belongs in, and moves them with shell commands.

What it does

## Try It Out! ### This workflow does the following: * Monitors a target folder for changes using the local file trigger * identifies all files and subdirectories in the target folder and passes this to Mistral AI * Mistral AI suggests where to move top level files into which subdirectories. It can also suggest subdirectories tp create if none are suitable. * Finally, we take the AI's suggestions are perform the move operations using the execute command node. ### Need Help? Join the [Discord]({{ $env.WEBHOOK_URL }} or ask in the [Forum]({{ $env.WEBHOOK_URL }} Happy Hacking!

The steps

  1. Local File Trigger
  2. Get Files and Folders
  3. Files and Folders to Array
  4. Mistral Cloud Chat Model
  5. Structured Output Parser
  6. Set Variables
  7. Move Files into Folders
  8. If Has Target Files...
  9. Get Suggestions to List
  10. AI File Manager
  11. Error Handler

Similar automations