Try following this:
https://chatgpt.com/share/6893f888-8a70-800c-ad8a-0987257b93...In frigate, add this to the top of your configuration file:
mqtt:
enabled: true
host: IP_ADDRESS_OF_YOUR_HOMEASSISTANT
port: 1883
topic_prefix: frigate
user: USERNAME_YOU_CREATED_FOR_MQTT
password: PASSOWRD_YOU_CREATED_FOR_MQTT
Frigate will start sending various messages to Homeassistant.
Go to HA, go to MQTT settings and listen to a topic frigate/#
Observe the messages, pick the one which suits your needs.
Follow this for an example:
https://chatgpt.com/share/6893fd1c-2940-800c-a358-a840029e6e...
You dont really need to add the HA automation via yaml, you can click it through manually.