Skip to main content

Organise your local file directories with AI

Workflow preview

Workflow preview
100%
Organise your local file directories with AI preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

If you have a shared or personal drive location with a high frequency of files created by humans, it can become difficult to organise. This may not matter... until you need to search for something!...

Best for

  • File Management automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.localfiletrigger, n8n-nodes-base.executecommand, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.lmchatmistralcloud, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.stickynote, n8n-nodes-base.if, n8n-nodes-base.splitout

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Jimleuk.

Original n8n.io source

1.1 Workflow description

Title
Organise your local file directories with AI
Workflow name
Organise your local file directories with AI

If you have a shared or personal drive location with a high frequency of files created by humans, it can become difficult to organise. This may not matter... until you need to search for something!

This n8n workflow works with the local filesystem to target the messy folder and categorise as well as organise its files into sub directories automatically.

Disclaimer

Unfortunately due to the intended use-case, this workflow will not work on n8n Cloud and a self-hosted version of n8n is required.

How it works

  • Uses the local file trigger to activate once a new file is introduced to the directory
  • The new file's filename and filetype are analysed using AI to determine the best location to move this file.
  • The AI assess the current subdirectories as to not create duplicates. If a relevant subdirectory is not found, a new subdirectory is suggested.
  • Finally, an Execute Command node uses the AI's suggestions to move the new file into the correct location.

Requirements

  • Self-hosted version of n8n. The nodes used in this workflow only work in the self-hosted version.
  • If you are using docker, you must create a bind mount to a host directory.
  • Mistral.ai account for LLM model

Customise this workflow

If the frequency of files created is high enough, you may not want the trigger to active on every new file created event. Switch to a timer to avoid concurrency issues.

Want to go fully local?

A version of this workflow is available which uses Ollama instead. You can download this template here: https://drive.google.com/file/d/1iqJ_zCGussXpfaUBYGrN5opziEFAEQMu/view?usp=sharing

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Local File Trigger

Type / Role
n8n-nodes-base.localFileTrigger - localFileTrigger
Config choices
Version 1

Block 2 - Get Files and Folders

Type / Role
n8n-nodes-base.executeCommand - executeCommand
Config choices
Version 1

Block 3 - Files and Folders to Array

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.3

Block 4 - Mistral Cloud Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatMistralCloud - lmChatMistralCloud
Config choices
Version 1

Block 5 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 6 - Set Variables

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.3

Block 7 - Move Files into Folders

Type / Role
n8n-nodes-base.executeCommand - executeCommand
Config choices
Version 1

Block 8 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - If Has Target Files...

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 11 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Get Suggestions to List

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 13 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - AI File Manager

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.4

3. Summary Table

Workflow Organise your local file directories with AI
Complexity advanced
Nodes 16
Categories File Management, AI Summarization
Author Jimleuk
Published 10 Jul 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2334/2334.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Organise your local file directories with AI do?

If you have a shared or personal drive location with a high frequency of files created by humans, it can become difficult to organise. This may not matter... until you need to search for something!...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your File Management, AI Summarization use case.