This solution may be overkill for environments with a large number of agents, but for smaller teams it provides a practical way to notify an agent when they are mentioned, instead of relying on the generic “Ticket was updated” notification.
Since Zammad currently does not support dynamic mention-based email addressing, this workaround has to be configured per agent. When an internal note is written using @@Name, Zammad converts the mention into a link in the article body that contains the HTML attribute data-mention-user-id="X", where X is the internal user ID.
By using this attribute as a trigger condition (article body contains data-mention-user-id="X"), it is possible to send a dedicated email notification only to the mentioned agent, with the trigger’s email recipient explicitly set to the same user ID(to get the atribute tag, mention a user in the note and inspect it using developer tools in the browser).
The trigger also temporarily subscribes the mentioned user to the ticket and automatically unsubscribes them after execution, even if an explicit unsubscribe action is not configured.
I’m sharing this in case it’s useful or interesting to others who are looking for a similar workaround, or you see this as something for any future development.
