Automating DevonThink

I am trying to automate my DevonThink Database and like to have something which allows me that - whenever a file in a specified external Dropbox folder is added that this file will be automatically imported to DT.

What I already have is a folder action attached to this specific folder launching a DT script bringing up a dialogue to which folder the file should be imported.

The problem however is that this external dropbox folder has a variety of sub-folders and changes applied thereto simply do not trigger the script or folder action. Is there any way to extend a folder action to the folder’s sub-folders? I could of course attach the same folder action to each and every sub-folder but I am afraid that this also wouldn’t work well if sub-folders are added…

Thanks in advance for your help.

It’s possible to write a folder action script that looks at the type of each item in the folder and if an item is type “folder” then the script attaches the action to that subfolder. (See some examples at macscripter.net)

Or, use Hazel.

Another possibility is to index this folder and use File > Update Indexed Items every then and now.