Notification when adding new calendar event

Hello, does anyone know if it is possible to create an automation to send a notification when a new calendar entry is created. (I use the local home assistant calendar). So far I only find articles to create automations based on the start or end of the event. I would like to have an automation that would send me a notification when creating a new event or editing an already created one.

I have this code that does send me a notification when I create a new event but it is also executed when I delete the event and I don’t want this. It also doesn’t notify me when I edit events.

alias: Not- Calendario
description: Envía notificación cuando se crea un nuevo evento en el calendario.
  - platform: state
      - calendar.calendario
    attribute: all_day
condition: []
  - service: notify.mobile_app_iphone_de_rafael
    metadata: {}
      message: Nuevo evento de calendario
mode: single

I’m sorry, I think I didn’t understand your point.

There is no existing trigger that will cover everything you want.

You need a trigger to fire an automation. Triggers rely on events being posted to the Event bus. On their own the acts of the act of adding or editing a calendar event do not post anything to the Event bus. The situation in which the act of adding or editing a calendar event creates an event on the Event bus is very specific… the addition or edit of the calendar event must change the state of the calendar entity.

There are two cases where that can happen:

  1. The added event is currently active and there are no other currently active calendar events.
  2. The added event is the next calendar event scheduled and there are no currently active calendar events.

Unfortunately, the trigger that will fire for the above cases will also fire whenever the current or next event changes during normal operation of events starting and ending.

I understand now. It’s a shame, I hope they add that option in future updates. Thank you very much for answering. Regards my friend