# Auto Flow

Set up automated folder watching in RenameClick — monitor folders and automatically rename, sort, and process incoming files with AI.

## [Core Concept](/content/docs/features/auto-flow#core-concept/index.html)

Auto Flow uses **rows** — each row represents an independent watch rule:

| Setting               | Description                                               |
|-----------------------|-----------------------------------------------------------|
| **Source Folder**     | The folder to watch for new/changed files                 |
| **Destination Folder**| Where processed files are moved after apply                |
| **Watch On/Off**      | Start or stop monitoring                                   |
| **Auto Apply**        | Automatically apply renames/moves, or keep for manual review |

You can create multiple rows to handle different workflows simultaneously.

## [Three Operating Modes](/content/docs/features/auto-flow#three-operating-modes/index.html)

### [1. Watch On + Auto Apply](/content/docs/features/auto-flow#1-watch-on--auto-apply/index.html)

- **Fully automatic** — files are processed and moved the moment they appear
- Best for "set and forget" automation
- Example: Watch "Downloads" → rename invoices → move to "Finance/Invoices"

### [2. Watch On + Auto Apply OFF](/content/docs/features/auto-flow#2-watch-on--auto-apply-off/index.html)

- AI processes files automatically when they appear
- Results appear in the **Processed** list for review
- You decide what to apply manually
- Best for workflows that need human verification

### [3. Watch Off](/content/docs/features/auto-flow#3-watch-off/index.html)

- Monitoring paused, no new files processed
- You can still inspect processed/applied/error panels
- Undo/redo is available when watch is off

## [Row Independence](/content/docs/features/auto-flow#row-independence/index.html)

Each row carries its own settings:

- **Sorting preset** — Different AI category, metadata folder, or Match folders preset per row
- **Custom instructions** — Different AI prompts per row
- **Format preset** — Different naming patterns per row
- **Output language** — Different languages per row
- **Rename on/off** — Enable or disable renaming per row
- **Categorize on/off** — Enable or disable categorization per row
- **Recursive on/off** — Scan subfolders or not per row

### [Row-Level Sorting Examples](/content/docs/features/auto-flow#row-level-sorting-examples/index.html)

| Row                | Sorting preset     | Result                                             |
|--------------------|-------------------|---------------------------------------------------|
| Downloads          | AI categories      | Sort invoices, contracts, receipts, and reports by content |
| Camera Imports     | Metadata folders   | Build folders like `Berlin Germany / 2026 / 04 / 30` |
| Client Uploads     | Match folders      | Scan the destination folder and route files into existing client subfolders |

Match folders is especially useful in Auto Flow when the destination folder already has a project or client structure. New files can continue that structure without manually rebuilding category presets.

### [Multi-Folder Example](/content/docs/features/auto-flow#multi-folder-example/index.html)

| Row | Source         | Prompt                | Destination                | Mode       |
|-----|----------------|-----------------------|----------------------------|------------|
| 1   | ~/Downloads    | Invoice extraction     | ~/Finance/Invoices         | Auto Apply |
| 2   | ~/Desktop      | Default               | ~/Archive/Screenshots      | Manual review |
| 3   | ~/Scans       | Medical docs prompt    | ~/Documents/Medical       | Auto Apply |

All three rows run simultaneously in the background.

## [File Detection & Stability](/content/docs/features/auto-flow#file-detection--stability/index.html)

Auto Flow doesn't just blindly process every file system event:

1. **File detection**: Folder watcher detects new/changed files
2. **Stability check**: The app waits for the file to stop changing (size and modification time stable for ~1.2 seconds)
3. **Queue**: Stable files are added to the processing queue
4. **Deduplication**: If a file is already queued or being processed, duplicate events are ignored

This prevents processing incomplete downloads, files being copied, or other transient states.

## [Loop Prevention](/content/docs/features/auto-flow#loop-prevention/index.html)

- Files inside any row's destination folder are **never processed**
- Files recently moved by the app are tracked and ignored for 10 seconds to prevent re-triggering
- This prevents infinite loops when source and destination folders overlap.

## [Panels](/content/docs/features/auto-flow#panels/index.html)

Each row has panels for tracking status:

| Panel          | Shows                                                   |
|----------------|---------------------------------------------------------|
| **Queue**      | Files waiting to be processed                           |
| **Processed**  | Files with AI suggestions ready for review (when Auto Apply is off) |
| **Applied**    | History of successfully renamed/moved files             |
| **Errors**     | Files that failed with error messages                   |

## [Persistence](/content/docs/features/auto-flow#persistence/index.html)

Auto Flow survives app restarts:

- Row configurations are persisted
- Processed, applied, and error caches are preserved
- **Watch on restart** option — rows automatically resume watching when the app starts

## [Undo / Redo](/content/docs/features/auto-flow#undo--redo/index.html)

- Each apply operation creates an undo checkpoint
- Undo moves files back to their original location
- Redo re-applies the undone operation
- **Only available when Watch is OFF** (to prevent conflicts with live automation)

## [Credit Usage](/content/docs/features/auto-flow#credit-usage/index.html)

- AI processing (analysis) is **unlimited** — no credits for suggestions
- Credits are consumed only when files are **successfully applied** (renamed/moved)
- If credits run out during Auto Apply, the row is **automatically paused** with a "No credits left" message
- Pro users have unlimited operations.
