How do I identify which of 3 doors was opened so script can announce proper door name

Working through an issue with an automation being run when Alarmo is triggered. I need to use a HA scripts, not Alarmo scripting because of needs to adjust speaker volume, etc. Stuff that Alarmo can’t do natively. So here’s my question.

I have 3 doors as part of the alarm, opening any one will create a trigger. If any of the doors open, it triggers a soft chime through the automation below. More of a signal that someone has come home than an actual alarm.

But I don’t know how to pass the variable to the script to announce “which” door is open. So the automation for the time being simply says “Front Door is Open”. Is there some way I could determine which door, and modify the automation accordingly? Automation is here. Really appreciate any advice:

alias: Alarm action in home mode called by Alarmo Triggered
sequence:
  - service: siren.turn_on
    data:
      tone: "30"
      volume_level: 0.2
    target:
      device_id: ef9fd809872118c7964c45e54bdb7479
      entity_id: siren.indoor_siren_6_3
  - service: media_player.volume_set
    data_template:
      entity_id:
        - media_player.google_speaker_group_outdoor
      volume_level: 0.5
  - service: media_player.volume_set
    data_template:
      entity_id:
        - media_player.google_speaker_indoor_group
      volume_level: 0.3
  - service: tts.speak
    data:
      cache: true
      media_player_entity_id:
        - media_player.google_speaker_group_outdoor
        - media_player.google_speaker_indoor_group
      message: The front door is opening. The front door is opening.
    target:
      entity_id: tts.piper
  - service: notify.Both_Phones
    data:
      message: Front Door was opened
      title: Front Door was opened
      data:
        ttl: 0
        priority: high
mode: restart

The specific method you use to pass variables to a script depends on how you are calling the script, but the general concept is as follows.

Use the trigger variable to pass the triggering entity’s name from the automation:

#automation
...
  - service: script.alarm_action
    data:
      door_name: "{{ state_attr(trigger.entity_id, 'friendly_name') }}"
...

Then, everywhere you want the entity name in the script, replace it with the variable:

#script
  - service: tts.speak
    data:
      cache: true
      media_player_entity_id:
        - media_player.google_speaker_group_outdoor
        - media_player.google_speaker_indoor_group
      message: "The {{ door_name }} is opening. The {{ door_name }} is opening."
    target:
      entity_id: tts.piper

That first part, where you write

- service: script.alarm_action

Where is that, in what automation? Do I create a separate automation in HA?

What automation causes the following to happen…?

If you don’t share all the pertinent parts, we can only guess how the chain of events is structured.