Help needed for my first simple script

Hello I’m new to home assistant and I’m trying to learn how to set up a simple script.
I have 8 arlo cameras around my house and I want to receive a push notification with camera thumbnail when motion is detected.
Each camera save a thumbnail of the current footage when motion is detected in config/www/arlo overwriting the existing one.
For example camera.aarlo_front_door save a thumbnail in the file config/www/arlo/front_door.jpg when motion sensor binary_sensor.aarlo_motion_front_door change his state to on.
I also created an automation which works flawlessly:

alias: 'Camera Notification '
description: ''
trigger:
  - platform: state
    entity_id: binary_sensor.aarlo_motion_front_door
    to: 'on'
    for: '00:00:01'
condition: []
action:
  - delay: '00:00:10'
  - service: notify.mobile_app_mi_note_10_lite
    data:
      message: Front Door
      title: Motion Detected
      data:
        image: 'https://XXXXX.duckdns.org/local/arlo/front_door.jpg'
mode: single

The script just have to read which camera triggers the automation (for example camera.aarlo_front_door, camera.aarlo_back_door, etc) and replace the message (Front Door, Back Door) and jpg file name (front_door.jpg, back_door.jpg) in the notification.
Thanks in advance for the help.

Easy - just specify a list of entities and use trigger.to_state.name in the message. Here’s an example:

- alias: Door Lock Status Announcement
  initial_state: true
  mode: queued
  trigger:
    - platform: state
      entity_id:
        - lock.garage_side_door_lock
        - lock.front_door_lock
        - lock.dr_door_lock
  action:
    - data:
        message: "{{ trigger.to_state.name }} {{ trigger.to_state.state }}"
        data:
          type: tts
      service: notify.alexa_media_dining_room

Tried this way:

alias: 'Notification'
description: ''
trigger:
  - platform: state
    entity_id:
      - binary_sensor.aarlo_motion_front_door
      - binary_sensor.aarlo_motion_back_door
    to: 'on'
    for: '00:00:01'
condition: []
action:
  - service: notify.mobile_app_mi_note_10_lite
    data:
      message: '{{ trigger.to_state.name }}'
      title: Motion detected
mode: single

But nothing happens, just this error log:

Notification : Error executing script. Unexpected error for call_service at pos 2: Error rendering data template: UndefinedError: 'trigger' is undefined
Notification : Error executing script. Unexpected error for call_service at pos 2: Error rendering data template: UndefinedError: 'state' is undefined

What am I doing wrong?

Ok the problem is that I was just executing the automation without triggering it.
Now I receive the right message saying Motion Front door, but how can I convert it in front_door.jpg?