I was just looking at another thread yesterday, for telegram automations, and I think I saw the kind of thing you are looking for.
In the threads linked below, they have multiple entity IDs triggering a single automation, but want to say in a notification the name of the entity that triggered it. They used the template {{trigger.entity_id}} to specify this.
I haven’t tried it myself, but I think this might point you in the right direction.
(And another thread, also with notification based on the trigger’s entity ID)