Google AI and Frigrate Notifications with a change image file name

Been reviewing this Guide for CCTV Snapshot on motion, send to Google Generative AI & get notification with description & snapshot but I am using Frigate with snapshots that store the photos here

./media/frigate/clips/

Image name changes

Front_Dome_CCTV-1729653271.623223-f2cdy2-clean.png

My question is how do I accomodate and only work with the latest image?

action: google_generative_ai_conversation.generate_content
data:
  prompt: >-
    Very briefly describe what you see in this image from my remote camera. Your
    message needs to be short to fit in a phone notification. Do not describe
    stationary objects or buildings.
  image_filename: /media/frigate/clips/Front_Dome_CCTV-1729653271.623223-f2cdy2-clean.png
response_variable: generated_content

Sort of like this

image: >-
https://HA-URL/local/snapshots/intercom_snapshot2.jpg?{{as_timestamp(now())}}

Returns a error

Error rendering data template: UndefinedError: ‘None’ has no attribute ‘attributes’

data:
  prompt: >-
    Very briefly describe what you see in this image from my remote camera. Your
    message needs to be short to fit in a phone notification. Do not describe
    stationary objects or buildings.
  image_filename: >-
    {{ '/media/frigate/clips/' + (states.camera.front_dome_camera.attributes['last_motion_image'] | default('Front_Dome_CCTV.png')) }}
response_variable: generated_content

Ideas?