Smart rule not running

for some reason I cannot point out why the rules are not running. What I know from searching this forum and other users putting up the messages that

  1. I need to create a indexed folder and create the rule watching this indexed folder
    I did this and I am not sure why the smart rule is not triggered even if it is able to identify the document.

the setup is really simple files I download are prompt by a hazel watching that folder to add the correct tag. the hazel leaves the document in the same folder with the tag. Devonthink sees the document being added with the tag and smart rules (check on that tag) recognises it but it does not run unless I run it manually. Is there any logs that devonthink writes that we can see what is the issue with this.

Hazel script

Smart Rule

Welcome @imohan
Are you manually dropping the files into this Finder folder?

No, I am not, I am downloading the file from Internet and hazel is just adding the tags and leaving the files in the same folder and Devonthink is recognising this

indexed folder
Screenshot 2024-02-25 at 11.41.38 PM

smart rules
Screenshot 2024-02-25 at 11.41.52 PM

finder

in the finder I still see the documents, that should be moved to the Devonthink db. If I apply the rule, docs will move.

I used to use hazel to import the files in Devonthink and I am changing to start using the smart rules and looks like it is not working as expected for now

Thank you for responding to my query so fast.

You’re welcome!
Processes like Hazel, AppleScripts, folder actions, etc. don’t trigger smart rules.

here is what I did. I created another tmp folder on which I am running the hazel scripts and once the proper tag is added to the file it moves the files to relevant folder which is indexed by Devonthink and the Smart Rule is immediately run.

it defeats the purpose that I have to manually add the file to indexed file.

I may need to optimize and run the same scripts with in smart rules and remove dependency on hazel or any other fodder action scripts.

for now it is resolved but need to optimize more on the workflow.

If all the hatten Hazel script does is adding tags to the file: you can do that as well in your smart rule. Thus skipping Hazel completely and simply run the smart rule on import.

yes that is correct, but I need to learn how to do this in the smart rule. Need to find how to prompt user to enter or select the tag applied to theRecord that smart rule is acting on.

You can use nearly the same code in an internal script in a smart rule. I’d quote it here, but since you didn’t post code, but just a screenshot, that’s not possible.

But instead of running a dialog in an automation, a better approach would probably be to figure out rules so that the tag(s) can be set automatically.

1 Like

Since the file is put into a folder that is an indexed Group in DEVONthink, are you updating the index?

I use Hazel to help put stuff into DEVONthink. In Hazel I interrogate the content to figure out the right file name, tags, etc then Hazel moves the file to the DEVONthink Global Inbox and from there it is imported and Smart Rules can run.

In case of value:

2 Likes

Thank you @rmschne, @chrillek and @BLUEFROG for responding to my post and really appreciate you all pointing to the right direction.

I need to read through the documentation to fully utilise the smart rules. Is there a web url where DevOnthink publish all the functions, classes, object available for us to consume this.

1 Like

You’re welcome :slight_smile:

Check out the Automation chapter in the built-in Help and manual as well this forum section.