Smart Rule Not Activating

After having owned DT since version 1 in 2006 I’ve started to actually use it :face_with_raised_eyebrow: finally. So, utter n00b here. Anyway…

After dozens of attempts and searches in the forum, I’m stumped.
I have a Finder folder with the AS action attached to import into DT then delete any file that goes into it (the AS provided with the install). That works.
My quest is to get the PDF into a Group called Rocketbook.
The AS gets it into the INBOX just fine but then the Smart Rule doesn’t do anything (unless I tell it to activate every minute).


What doesn’t work is any other setting: On Import or On Moving into Database because the rule just never gets around to actually moving the files into the Rocketbook group (and marking them as Read) until I explicitly right click to Apply Rule.
Do Smart Rules not run on their own? This seems simple but I guess something’s amiss in my setup. :confused:

I would rather have the AS move the files directly into the Rocketbook group but could never get that to work either, which I why (after reading the forum for help) I thought a Smart Rule might be easier and more flexible.

AFAIK, Finder actions are no longer necessary. And I doubt that they ever triggered anything inside DT, ie Import or Move.

The handbook explains how to get documents into DT reliably. There are also a lot (!) of threads here that discuss this.

The included folder actions don’t trigger rules to remain compatible to version 2.x workflows but it’s possible to customize the scripts and use the perform smart rule command. However, recommended is to use indexed groups & smart rules instead of folder actions.

I’m a little confused and searching the “DEVONthink Manual” or this site has not landed me with an answer to my initial question. Probably my bad.

Which of the items in the OP’s screen shot are the folder actions that should be avoided?

All folder actions are discouraged actually since version 3 but still supported. There’s none visible on the screenshot but the user mentions that at least one folder action is used:

Sounds like the DEVONthink - Import & Delete action.

1 Like

Welcome @rowan

Please check out our recent blog post that touches on folder actions and replacing them with smart rules…

1 Like

OK, wow, was this ever the solution! Just spent almost 2 hours processing this (again, really new so had to dig into some concepts like what “Move to Database” actually means) but yeah, this solves the problem and now I don’t have to deal with attaching AS to folders (yes, I was using the Import and Delete script). Here’s my rejiggering:


My couple of changes have to do with organizing but the File > Index Files and Folders combined with Move Into Database were the secret sauce.

Glad I asked about this before importing 5,662 Evernote notes! :laughing:

I will say as a new user that it looks like the DT developers want you to use Applescripts just given how obvious and prevalent they are.

2 Likes

We are fans of automation in general. And while scripting - AppleScript or JXA (javaScript for Automation) - can do some very cool things, smart rules were developed with the less technically-savvy in mind. As your new smart rule attests, there’s plenty of power available to the non-coder crowd too! :slight_smile:

1 Like

Why do you run OCR on „any document“? I’d suggest to limit it to PDF with a word count of 0.

1 Like

Those particular uploads are always PDFs and when I was playing with the smart rule I just removed those steps but point taken.

Just curious: I assume the WordCount = 0 is to confirm previous OCR hasn’t been done on or there’s already a text layer. What happens if OCR is run on a PDF that already has words (WordCount > 0)? Does it mess it up somehow?

Yes, the empty Word Count functions as a text layer check.

It is possible to OCR a file with a text layer. Each page is rasterized into an image and processed anew. However, if this is a document that started as text, e.g., from Pages, it’s best to not reprocess it. The results could actually be different than the original.

In the past, some people here reported problems with re-OCRing. And inversely, sometimes running OCR on an ORC’d document does resolve problems. So: I don’t know. For me, it would mostly be a matter of “performance”: OCR is time-intensive, so I don’t see a point in doing it needlessly.