I have a smart rule that acts on tags and is set to trigger both On Creation and On moving into database (see smart rule set up below). However, when I create a new tag on a document in the global inbox and then move that document into a database, the new tag shows up in the database (i.e., it has been moved into the database) – but it does not run the smart rule on the new tag. Is this expected behavior? Is there any way for these new tags to trigger a smart rule when the document is moved into a database? Right now, I have to find the new tag in the database and manually apply the smart rule on demand (which works).
In short, I want to be able to create a new tag on a document in the global inbox and when I move the document into a database, I want to run a script on the new tag. Is there any way to do this?
I have the impression that smart rules can only be triggered by “user-initiated” actions.
I’m aware that one of my smart rules, which has the On Import trigger, applies when I drag and drop files into the inbox. It does not apply, however, when files are imported via the AppleScript command import, unless the script explicitly calls the smart rule through a perform smart rule command. I think it’s because AppleScript import is not considered a user-initiated action.
In the OP’s case …
… the new tag is not “moved” into the database. Rather, it is created automatically when DT recognizes that a tag of the same name does not exist yet in the destination database. Since the creation is automatic (not user-initiated), the smart rule’s On Creation trigger does not apply.
There’s also “Before sync” and “After sync”, and then there are time-interval triggers… I think that script actions do not trigger scripts (as you said with import not doing so), and I seem to remember that this is a design decision to avoid certain problems.
The “create not triggered by tag creation” issue was already discussed several years ago, also by the OP.