Automatically detecting creation of a new tag

The “On Creation” event specifically detects the creation of a new document in a specified location, allowing automated addition of tags, movement to location, etc. Is there a way to detect the ad hoc creation of a new tag, i.e., when a tag not previously existing in the database is added via the Inspector or tag bar? New tags are by default created at the top leveI of the Tags group. I would like to be able to create a Smart Rule, triggered by the creation of such a new tag, that could automatically move the tag into a tag group.

Specifically, in my genealogy document database, I have hundreds of surname tags in a Surnames tag group. Each surname tag ends with $, to mark it as a surname and keep it from being confused with a non-surname tag (e.g., “Gray $” to distinguish it from the place name “Gray” – or for that matter, from the Finder tag “Gray”). If I create a new “Jones $” surname tag, it ends up in the general Tags group, and I have to periodically scour my Tags group for new surname tags and move them into the Surnames folder to reduce the clutter. It would be great if an “On Tag Creation” event could trigger a Smart Rule that would shunt any tag ending with “$” into the Surnames tag group.

New tags are by default created at the top leveI of the Tags group

Are you referring to the top, top-level Tags group, as that would be incorrect.
Tags are made in the Tags group of the database of the currently selected item.

I see the On Creation trigger doesn’t work unless the Tags are created in the Tag group (whether in the item list or the Navigate sidebar).

Development would have to assess the feasibility of this.

No, I did mean the Tags group of the current database.

I’m not sure what you mean by “the On Creation trigger doesn’t work unless the Tags are created in the Tag group.” I actually tried creating a tag in the Tags group, and the trigger didn’t seem to work even there. (I was just experimenting with having a Smart Rule display an alert, since I also haven’t figured out yet how to use the Move action to move something into a Tag subgroup, as Tags don’t appear in the Move selector. But I didn’t get an alert, so the trigger didn’t seem to be working even in the Tags group.)

This is the smart rule I tested.

No sound on this GIF, but… When I create a new tag in the Tag group, the system sound goes off.

Interesting. I didn’t have the “Date Added” criterion. It does work when I added that, but as you noted it only works within the Tags group, not when adding to a document. Also, it is triggered immediately when you select New Tag (which is created with the name “New Tag”), so it seems to be impossible to make any action dependent on the name you assign to the tag (e.g., ends with $). I’ll have to play around with this some more. I suspect if there’s any way to do it, it will probably involve executing an AppleScript.

On Renaming might be more suitable then.

I am trying to solve a similar problem, and I am wondering if there was ever a solution that allowed for moving a newly created tag added to a document based on its name.

I want newly created tags that all start with ‘psl’ (i.e. ‘psl.DUE.USAID1’ or ‘psl.DUE.NSF 2018’) to be filed as group-tags with a specific folder of a specific database. I will generally be creating the tags on documents.

My smart rule attempt (below) works perfectly once, but then after, it makes new copies of the tag in the destination folder, even if the tag is created (i.e. if I create the tag on one document, and then use the tag on another document, it creates a new group-tag with the same name). I tried creating the tag in the Global Inbox and the database inbox, but get the same behavior.

Is there any solution or workaround for this?

Screen Shot 4

Note that I also tried ‘Search in’ the Global Inbox and the specific destination database inbox, both when creating the document in the Global Inbox and destination database inbox, and I get the same behavior.

?

You are creating a Tag then want to move that to another folder so it’s no longer an ordinary Tag but a Group Tag?

Yes. I basically want to be able to create new group-tags on the fly (by adding them to documents) that are automatically filed within my group hierarchy based on naming conventions.

You could do this, though I wouldn’t be broadly targeting Databases. I’d be more specific in the criteria and targeting, as shown here.

The “File” smart rule action might be an option as the destination supports placeholders.

These don’t quite do what I want because a new (duplicate) tag group is still created if I add the tag to a new file a second time in the inbox, even though the tag appears in the autocomplete list. This may be because I have created it within the hour. However, I often need to create a tag group and then immediately add a number of files to it, so I need something that can handle that without making duplicate tag groups.

I don’t quite see how the File smart rule action would help here. My use case would be something like the following:

  • Document 1 comes into my inbox that is relevant to a new proposal I am working on
  • I add a tag ‘pslDUE.proposalName.stuff’
  • a tag group ‘pslDUE.proposalName.stuff’ is added to a group ‘All Proposals’
  • the tag group appears in my smart group that looks for tags with a name containing ‘pslDUE’
  • when new documents are added, I file them by adding the tag ‘pslDUE.proposalName.stuff’ using autocomplete
  • when the proposal is submitted, I change the tag group name from ‘pslDUE.proposalName.stuff’ to ‘pslSUB.proposalName.stuff’, so that it appears in my smart group that looks for tags with a name containing ‘pslSUB’

There are several key features I am trying to keep:

  1. I want to create the tag group when the first document appears that needs to be filed
  2. I don’t want to have to go back in and file my tag groups manually after creating each one
  3. I want to be able to name them with prefixes that I can use in my smart group system that looks for pslDUE, pslSUB etc.

Would the file smart action rule be able to achieve this?