Field Notes

Sort your Mac Downloads folder by what each file is

An invoice and a research paper are both .pdf. This flow reads each new download, asks Jev what it is, and sorts your Downloads folder only when Jev is sure.

Three real PDFs named doc_20260914, download (3) and scan0042 land in Downloads. Jev reads each one and files them as an invoice, a paper and a receipt.

Open ~/Downloads and count the PDFs. On most Macs it runs to hundreds: an electricity invoice, the receipt for a keyboard, a signed lease, two papers you meant to read, last month's card statement. Sorting the Downloads folder by extension puts every one of them in the same pile, which is the pile you already have.

Sorting by name does not help either, because names lie: document.pdf, download (3).pdf, scan_0042.pdf. The receipt you need for an expense claim is named like the forty files around it, so finding it means opening them one by one.

How the flow sorts each new download

Each new file in Downloads gets read on your Mac: the first page of a PDF, or the words in an image. The file name and that text go to Jev, TypeSafe AI's System One model, with one question: which of these eight kinds is this? When Jev is confident, Move File puts the file in ~/Documents/Sorted/<kind>/. When it is not, the file stays exactly where it landed.

Why Jev and not a chat model

Jev does not write text. You give it a state and a typed question, and it returns a probability for every option, summing to 1, plus a confidence that says how peaked that distribution is. TypeSafe calibrates those numbers, and their guidance is printed under the node's slider: below 0.5 the model is genuinely unsure, above 0.9 you can act automatically.

A threshold is only worth setting if the number behind it means the same thing every time. You can ask an AI Prompt node to rate its own confidence, but that number is more text it wrote, and nothing ties it to how often it is right. Jev: Choose routes on its measured confidence for you: Confident and Unsure are outlets, not a Condition you build.

The flow, node by node

Fig. 1Three sections: read the file, ask Jev, file it. PDFs and images each take their own reader, and all three paths join at Jev: Choose.

Downloads is a Directory Changed trigger on ~/Downloads with Watch Subdirectories off and Event Types set to Created.

Finished download? is a Condition with one rule: fileExtension matches the regex ^(crdownload|part|download)$, with NOT on. Chrome writes a download as .crdownload and Firefox as .part, and without this rule the flow would move a half-written file out from under the browser. When the browser renames the finished file, the trigger sees the new name as a created file and the flow runs again on the real thing.

PDF? sends PDFs to Extract Text (PDF) with Page Range 1. Image? sends files whose fileType is Images to Extract Text (OCR). A .dmg or a .zip goes straight to Jev with only its name. Both readers run on your Mac, and a scanned PDF with no text layer gets OCR automatically.

The three paths join at Jev: Choose. A node with several inputs waits until each path into it has run or been skipped, so Jev runs once per file whichever way the file came.

Fig. 2Jev: Choose. Each option key is also the folder name, and Minimum confidence sits at 0.8.
Fig. 3Extract Text (PDF) reads page 1 only. That is where an invoice says it is an invoice.

Jev: Choose has four fields that matter:

The keys double as folder names. Worth filing? checks that {{jev.choice}} is not Other, and Move File sends the file to ~/Documents/Sorted/{{jev.choice}}/. Create Directories makes Receipts the first time a receipt arrives, and with Overwrite Existing off a second invoice.pdf lands as invoice-1.pdf.

The Unsure outlet is not wired. A file Jev is unsure about is left alone, which is the right default for a flow that moves your files.

What it needs and what it costs

Jev is a cloud model: the file name and extracted text leave your Mac, the file does not. The node's Account field picks who pays: a Jev account connected in Settings, Integrations (key from console.typesafe.ai), an OpenRouter provider, or Watchflows Sparks. OpenRouter hosts the same model, so thresholds mean the same on every route.

Fig. 4Settings, Integrations. The Jev tile takes one API key, and connecting it spends one tiny test question.

The pricing catalog Watchflows ships lists Jev at $0.042 per million input tokens, output free. A first page plus the question and options is a few thousand tokens at most, so a thousand files costs around a dime. The spend shows in the cost chip like any AI node's.

Edge cases that bite

Sort the 1,400 files already in Downloads

Directory Changed only reacts to new files. Switch the flow on while Downloads is full and Folder Sweep asks what to do with the ones already there.

Fig. 5The card when you switch the flow on: the folder's file count, and Just watch, Preview or Run on N, with the most AI calls each file can make.

Pick Preview. Every file runs through the flow and Jev really answers, so Preview costs what the flow costs, but nothing moves. The review lists each file before and after, grouped by destination, with Unsure files under Left alone. Uncheck what you disagree with, then Commit: exactly the checked moves happen, and Jev is not asked again. The sweep's row in the run history carries Undo sweep, which puts the moved files back.

Variations

Paste this into the Flow Builder to get the same flow:

Paste into the Flow Builder

Watch ~/Downloads for new files. Skip anything ending in .crdownload, .part or .download. Read the first page of PDFs and OCR images, then ask Jev to choose what the file is: Invoices, Receipts, Statements, Contracts, Papers, Installers, Screenshots or Other, with a minimum confidence of 0.8. When it is confident and the answer is not Other, move the file into ~/Documents/Sorted/ in a folder named after the answer.

What's in this flow

One trigger. Nodes are listed in the order a run reaches them; the canvas above shows where it branches.

Download this flow
  1. Directory ChangedDownloads
  2. ConditionFinished download?
  3. ConditionPDF?
  4. TransformExtract Text (PDF)
  5. ConditionImage?
  6. AIJev: Choose
  7. TransformExtract Text (OCR)
  8. ConditionWorth filing?
  9. FileMove File

Run this one yourself

Download the flow, double-click it, and Watchflows opens it on the canvas. Everything in this note is on the 14-day free trial.