Many-to-many Linking in Automations

Further to my earlier question, there doesn’t seem to be a way of adding existing entities into another entity’s collection (i.e. linking to those entities in a many-to-many relation) through automations. The actions currently offered are:

  • Add [Database] Item : This basically creates a whole new entity rather than searching and linking to an existing entity
  • Update [Database] : This updates the linked entity/entities (based on optional filter) rather than updating the collection
  • Delete [Database] : This actually deletes the linked entity/entities (based on some filter)
  • Unlink [Database] : This removes the linked entity/entities from the collection without totally deleting the source entity

You are able to use the Update Field Action to add one and and only one item to the collection but the next time you call that, it just overwrites the previous relation even though it is a many-to-many relation. You are able to work around this using scripts.

So I wanted to propose a “Link [Database]” action in automations.

Just to clarify, it is possible to link multiple items using the Update Field action, but you’re right that these items will replace any previous linked items, rather than add to the collection.

Having a separate “add entity(ies) to collection”, while NOT overwriting the existing collection, would seem like a pretty fundamental capability.

Yep, only currently possible with a script, I’m afraid :frowning_face:

Fixed :slight_smile: