Cannot get smart rule to work

I created a smart rule that runs if “All of the following are true”.

Then, I have three simple rules.

Two “Contact matches” words taken right from the PDF.
One “Name contains”.

Then, “On Import” (I think “On import” means when I drop the file into the inbox, but I’m not sure), I “Move” to the appropriate folder.

Yet, nothing happens. I can click to apply the rule now, but the file stays in the inbox.

So, am I doing something wrong or is DT possibly having issues reading the PDF?

Thanks in advance,

It might be helpful to see a screenshot of the smart rule (if it discloses nothing confidential of course).

Edit: When debugging smart rules which seem not to work I find it helpful to break them down into smaller chunks and include some simple action (like Display Notification > Success) to work out where exactly the rule might be failing. In your case you could find out whether it’s the match, import or move which is failing.


1 Like

Thanks @Stephen_C.

To make it as simple as possible, I removed the two conditions in the rule that had a contains for text in the PDF file itself and just left the matching “contains” for text in file name itself. Still does not work.

If I right click the file in the inbox, there is a classify option which will work if I manually click it from the right-click menu, but I shouldn’t have to do that.

I don’t see where all these options are clearly described. It’s unclear what “On Import” actually means. I’m assuming it means when I import the file into the inbox…???

Manually running this rule does not work either.

How is that possible?..I’m missing something very basic.


Sorry, I was editing my post as you were replying to it! I have very similar rules which do work so I can’t for the moment see where yours might be failing. How are you importing the file? I simply drag and drop my files to the Inbox in Finder and that certainly works.


Take a look at the Smart Rule Events and Actions section in the appendix to the manual (also available in app):

On Import: Runs when documents are added to the specified location.


I’m dragging the file from the desktop to the “Globals” inbox. Then, my rule does a “Search in” … Inbox.

I’m confused what you meant when you said you dragged your files into the Inbox in Finder. I don’t have any “Inbox” in Finder.

DEVONThink 3 > Install Add-Ons… and check Global Inbox in Save Dialogs.

Try breaking down your rule once more, limiting it to the “match” condition and adding after that a Display Notification action—just to check whether the rule actually matches the document. You should be able to apply that rule without re-importing the document.


Whenever I’ve had a smart rule not work, it was usually because of some tiny mismatch in the names. So could you share with us the exact search terms you are looking for, and what the file itself looks like? (If the data is sensitive, just make a demo file and rule.)

To test this out, I recreated your smart rule:


then I made an RTF file on my desktop called “test move file.rtf”:


which I dragged into DT inbox of my Research database. It then got moved by the rule to the group “To read and file”.

Yes, I think that was it. I appreciate everyone’s helpful replies. This is a really good support forum.

The “On Import” doesn’t seem to run when I drag and drop the file into the inbox, but if I change it to every hour, that seems to work.

When I drag the file into my Globals sub-inbox for the actual database (the rule checks that inbox), nothing happens. The file stays in the Inboxes’ sub inbox for the database.

At least the rule works automatically if I change it to hourly, or if I manually click “Apply rule” (with On Import trigger), but I guess I’m still missing something about the On Import trigger. I’m expecting to drag a file into the sub-inbox and with the On Import trigger, that file should automatically go to the folder in the database. It just sits in the sub-inbox until I say “apply rule”.


The rule you posted above is checking the global inbox, not the database’s own inbox. Try changing the scope of the rule to the database’s inbox.

Also, are you dragging files from the OS into the inbox, or from other parts of the database? (Not sure if that makes a difference…)

When I look at “Open Databases” and look at the folders (sorry, Groups) displayed, there is no inbox shown. Same with other databases. The only inbox I see for that database is a sub-inbox under Globals.

If I create a Test database, this is what’s shown in the database itself:


But, then at the top under Globals, the Test inbox is there:


I am dragging from a file on the desktop into the inbox.

If I “apply rule”, it works so it appears the inbox is correctly identified, but if there should be an inbox in the actual database itself, not in Globals, I’m not seeing it.

Shouldn’t the import be automatic on a file is dragged to the inbox?

Still confused on what the behavior should be.

If I do a File … Import from the File menu and try to “import” the desktop file that way, that approach ignores the rule and puts the file into the root folder of the database, not the specified folder.


Again, this from the manual may help a little:

The Global Inbox is also special as it is the only database you can add a shortcut to in the Finder’s sidebar. This allows you to save a file into the Global Inbox from other applications.
All databases also have an Inbox group with the same purpose as the Global Inbox. It just allows you to save unfiled data to a more specific database, as needed.

Thus if you’re dragging and dropping an item to Inbox in the Finder sidebar it is to the Inbox in your second screen shot. In that case the search in the screen shot in this post should find it…so long as you are looking for a correct match.

The listing under Globals shows first the global inbox and then each inbox in each of your other open databases.

If within DT3 you use File > Import > Files and Folders… you will import to the currently highlghted folder in your database.

I hope this helps a little but if you’re still having problems just ask. There are a lot of helpful people on this forum who are much more knowledgable than I am! :grin:


Dragging the file to the “inbox” in Finder (after adjusting the rule to look there instead of the sub-inbox) does not work. The file just sits in the inbox. This is with the “On Import” trigger selected.

If I instead, pick something else like once an hour or on exit or even “apply rule”, then it works – so the rule itself seems fine. It’s just the “on import” that does not work.

Mystery continues…


In the Finder, control-click the Inbox and select Show in Enclosing Folder


The problem is that the rule does not work. I have posted screenshots and detailed explanations.

Yes, my rule looks there. The On Import action does nothing. If I click “apply rule” or use the quit action or the hourly action, it works. So, the file is in the right “inbox” and the rule runs and does the right action. Just does not work on “on import”…

The problem appears to be the “content matches” line in the rule. Again, although this rule works OK when run manually, it does NOT work on on Import.

The line matched in the PDF is a single upper case company name I can easily copy and paste from the PDF itself.

(A simple text file works OK.)

What is the next step?

I’ve now spent several hours trying to get this to work.

This appears to be a bug in DT.

Sorry, but I disagree with that. I’m sorry not to have been able to help but I have similar smart rules that work perfectly “On Import”.

One final thought…do you have more than one smart rule which might work on the imported document? In other words, is it possible that more than one smart rule applies to the imported document?


Do you have a match on a string inside a PDF as a condition?

I currently only have the single smart rule.

I have just tried that specifically and it worked perfectly for me. On import, without further intervention from me, it:

  • found the relevant text in the pdf; and

  • moved the pdf to the folder I specified.

Next question: when you highlight your pdf in DT3 and use the generic inspector (⌃ 1) does the Kind show as PDF+Text?




Plus, if I take the PDF to the desktop, both Houdaspot and Spotlight find the text inside it.

Well, sorry, I’m completely at a loss now. It very clearly works for me and I’m afraid I’ve run out of ideas as to why it’s not working for you. I think you’ll have to wait for a Real Expert to come along. :smile: