Run a script on item added to a database, group, tag or label?

Hello,

Is it possible to run a script on items once they are added to to a database or folder?

Is it possible to run a script on items when assigned a tag or label?

I am looking for a good “read it later” workflow for stuff that is in my DT library. I’d like to run a script when an item is placed in a read it later group or DB, so that it copies a link to that item and creates a new omnifocus task with that link in the notes. Alternatively I’d like to do the same thing when I either tag or label an item which is anywhere in devonthink.

I think I have the tools to write the script to take the link and create the omnifocus task. But I don’t know where to start on initiating the script when the item is added to the DB/group or when the tab/label is assigned. Is it possible to run a script on those actions?

Many thanks,

Check out smart rules, often discussed in these forums.

Also see Help > Documentation > Windows > Main Window > Sidebar: Navigate > Smart Rules, Automation > Smart Rules, and Automation > Smart Rule Scripts.

Note there is no event trigger for changing when an item is labeled, but an intervallic even trigger, like hourly can process the files. Also, smart rules can be run on demand via Control-clicking the rule and choosing Apply Rule, Tools > Apply Rule, or via the contextual menu.