Mindket

Local folder files sorted into subfolders by Mistral AI

Newversion 1 · updated

Overview

An n8n workflow that watches a folder on your own n8n machine. When a file arrives, a Mistral chat model picks a subfolder for each loose file, and a short shell script moves it there.

Local folder files sorted into subfolders by Mistral AI is an n8n workflow in the Productivity category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • Your own n8n server: the same file, with the folder mounted into n8n’s container if you use Docker
  • Mistral: the chat model that decides where each file goes
  • A folder on the same machine: the one the workflow watches and sorts
  • n8n Cloud: not suitable, because it has no access to your folders

Platform

Connects 1 app

How it works

Trigger

File added to a folder

It starts when a file is added to the watched folder:

  • The folder’s path, set in Local File Trigger
  • Any new file in the folder or in its subfolders

Actions

  1. The loose files and the subfolders at the top of the folder are listed
  2. The run stops when there is no loose file
  3. A Mistral chat model groups the files and names a subfolder for each group
  4. A shell script creates each subfolder and moves the files into it

Result

The loose files of the folder, moved into subfolders that the model chose

Integrations

What you need before you start.

Mistral AI

Language model

Reads the file names and the subfolder names, and decides which subfolder each file goes to.

NeedsA Mistral API key in a Mistral Cloud credential

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
8 steps, starting on its trigger node
AI
1 step calls an AI model: AI File Manager
Sign-ins
Signs in to: Mistral
API keys
No API key is left in the file
Step types
Mindket’s checker reads 4 of its 6 step types. It does not read: Local File Trigger and Execute Command

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow tidies a folder on the machine that runs n8n. When a file arrives, it lists the loose files and the subfolders at the top of the folder and asks a Mistral chat model where each file belongs. The model may name a new subfolder, and a file it cannot place goes to misc. A short shell script then moves the files. Ten nodes run it, beside six sticky notes.

Who it suits

People who run their own n8n and keep a shared or download folder that fills up with loose files. Skip it on n8n Cloud, which cannot see your folders, and skip it for folders that hold anything you cannot restore from a backup.

Who uses it, and how
IndustryWho uses itHow they use itExample
Office workAdmin staffKeep a shared drop folder in orderA team drops invoices and photos in one folder, and they land in subfolders by kind.
Creative workPhotographersSort a folder of exportsA photographer sees raw files and exports end up in separate subfolders.
FreelancingConsultantsTidy a client download folderA consultant finds contracts and drafts split into their own subfolders.
Home useHome usersKeep the downloads folder tidyA user finds installers and documents sorted without a manual pass.

You need some n8n and a little Linux: add one credential, edit a folder path and enable two nodes that n8n 2.0 turns off.

Where to use it

Only a self-hosted n8n, since the trigger and the command node work on the files of the machine that runs n8n. The answers come from Mistral’s cloud.

  • Your own n8n server: the same file, with the folder mounted into n8n’s container if you use Docker
  • Mistral: the chat model that decides where each file goes
  • A folder on the same machine: the one the workflow watches and sorts
  • n8n Cloud: not suitable, because it has no access to your folders

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Setup takes one credential, one folder path and a change to n8n’s node settings.

What you need first
NeedDetail
n8nA self-hosted n8n, with Local File Trigger and Execute Command allowed in NODES_EXCLUDE
FolderA folder n8n can reach, backed up before the first run
MistralAn API key
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add a Mistral Cloud credential and select it in Mistral Cloud Chat Model.
  3. In Local File Trigger, replace the path /home/node/host_mount/shared_drive with your folder’s path as n8n sees it.
  4. Save, then press Publish.
  5. Drop a file into the folder and wait a moment.

How to use it

Drop files into the watched folder. After a moment the files at its top level move into subfolders, and new subfolders appear where none fit. Test on a copy of a folder first.

What to change for a different result
To changeWhere
The folderThe path in Local File Trigger
How the model sortsThe text and the system message in AI File Manager
The modelMistral Cloud Chat Model
The fallback folderThe word misc in the prompt of AI File Manager

Example

A shared folder holds invoice_march.pdf, holiday.jpg, notes.txt and one subfolder named photos. Someone drops in receipt_04.pdf.

The model sorts the loose files into invoices, photos and misc, and the script creates invoices and moves the files. If photos already holds a file with the same name, the new one keeps its name with a random number after it.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. Here one node lists the folder, one asks the model and one moves the files. Try it on a folder of five test files.

For experts. The workflow has two Execute Command nodes, one to list and one to move, with a Basic LLM Chain and a structured output parser between them.

Where to look closer
NodeWhat it doesWhat to know
Get Files and FoldersRuns two ls commands split by a === lineNames ending in Zone.Identifier are dropped by the next node
AI File ManagerGives the model both lists and asks for groupsThe output parser wants a list of objects with a folder and files
Move Files into FoldersRuns one shell script for each suggested folderFile names go into the script as one space separated list
Local File TriggerFires when a file is addedIts folder depth is unlimited by default, so moved files fire it again

Good to know

This workflow moves your files and puts names into a shell command, so test it on a copy and use only a folder that you alone write to.

  • Repair: the original named mistral-small-2402. Mistral’s model overview, read on 12 November 2026, says it was retired on 16 June 2025 and names Mistral Small 4 as the replacement. This copy uses its API name, mistral-small-2603
  • A bug fixed: when a file with the same name was already in the subfolder, the script tried to move a file that did not exist. It now moves the file under a name with a random number added, as its comment says
  • Node settings: n8n’s 2.0 breaking changes page, read on 12 November 2026, says ExecuteCommand and LocalFileTrigger are disabled by default, and NODES_EXCLUDE brings them back
  • Shell risk: the script builds its command from the model’s folder names and from your file names. A name with spaces breaks the list, and a name with shell characters can run commands
  • Many files at once: each starts its own run, and runs that list the same files can race
  • Your data: the names of your files go to Mistral, not their contents
  • Credentials: the JSON holds none

README and files

README

Local folder files sorted into subfolders by Mistral AI

An n8n workflow that watches a folder on the machine that runs n8n. When a file arrives, it lists the loose files and the
subfolders at the top of that folder. A Mistral chat model says which subfolder each file belongs in, and a short shell
script moves the files there. When no subfolder fits, the model names a new one.

What is inside

  • workflow.json: the workflow as n8n exports it, sixteen nodes: ten that do the work and six sticky notes. It holds no
    credential.
  • README.md: these notes.

What we changed from the original copy

  • The credential link on Mistral Cloud Chat Model is gone. Select your own.
  • The model was mistral-small-2402. Mistral's model overview, read on 12 November 2026, says that model was deprecated
    on 30 November 2024 and retired on 16 June 2025, with Mistral Small 4 as its replacement. Its model card gives the API
    name mistral-small-2603, which is now in the node.
  • In Move Files into Folders, the branch for a file that already exists in the subfolder moved a file named with a
    random suffix, one that does not exist. It now moves the file under that new name, as the script's own comment says.
    The mkdir and mv calls also put the subfolder in quotes.
  • The notes with links to n8n's documentation, to a Discord server and to a forum are short notes about each step.
  • Nothing else.

Before you start

  • A self-hosted n8n. The Local File Trigger and Execute Command nodes read and change the files of the machine that runs
    n8n.
  • Both nodes enabled. n8n's 2.0 breaking changes page, read on 12 November 2026, lists both as disabled by
    default. Remove them from NODES_EXCLUDE first.
  • A folder that n8n can reach. With Docker, put the folder in the n8n volume or bind one in from the host.
  • A Mistral API key.
  • A backup of the folder. The workflow moves files.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add a Mistral Cloud credential and select it in Mistral Cloud Chat Model.
  3. In Local File Trigger, replace the path /home/node/host_mount/shared_drive with your folder's path as n8n sees it.
  4. Save, then press Publish.
  5. Drop a file into the folder. After a moment the files at its top level are sorted into subfolders.

How a run goes

  1. Local File Trigger fires when a file is added to the folder. It waits until the write has finished.
  2. Set Variables keeps the folder's path as directory.
  3. Get Files and Folders runs two ls commands, one for the loose files and one for the subfolders, with a line of
    === between them.
  4. Files and Folders to Array splits that text into a files list and a folders list. Names that end in
    Zone.Identifier, the marker files Windows adds, are left out.
  5. If Has Target Files... goes on only when there is at least one loose file.
  6. AI File Manager gives both lists to the model with its instructions. The structured output parser asks for a list of
    objects, each with a folder and the files that go in it. A file the model cannot place goes to a folder named misc.
  7. Get Suggestions to List makes one item for each folder.
  8. Move Files into Folders runs the script once for each item. It creates the subfolder and moves the files into it.

Change the look

  • Which folder: the path in Local File Trigger.
  • How the model sorts: the text and the system message in AI File Manager.
  • The model: Mistral Cloud Chat Model.
  • The fallback folder: the word misc in the prompt of AI File Manager.

Good to know

  • This workflow moves your files. Test it on a copy of a folder first, and keep a backup.
  • The script puts the model's folder names and the file names into a shell command. A file name with spaces breaks the
    list, and a name or a folder with shell characters can run commands. Point it only at a folder that you alone write to.
  • Only files at the top level are sorted. Subfolders are left alone, and their names are given to the model as options.
  • When a name is taken in the subfolder, the older file stays and the new one gets a random number added.
  • Every file that arrives starts a run, and the trigger watches the subfolders too, since its depth is unlimited by default.
    A moved file starts a run, and no loose file is left then, so If Has Target Files... stops it.
  • Dropping many files at once starts one run for each, and runs that list the same loose files can race to move them.
  • The names of your files go to Mistral. Their contents do not.
  • The JSON holds no credential.
Files
NOTICE.md  618 B
README.md  5 KB
workflow.json  11 KB

3 files, 17 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Bonsai-27B-GGUF

lmstudio-community · Kit

A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…

New

Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…

New

MusicGen Small

facebook · Kit

Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists…

New

Similar in Productivity

See all in Productivity

ACE-Step 1.5 XL SFT

ACE-Step · Kit

Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…

New

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Frontend Slides

zarazhangrui · Skill

Builds HTML presentations from scratch or from a PowerPoint file and shows visual style previews to pick from, for people who want web slides with no CSS or Ja…

New32.3k