Calendar event trigger if no event immediately follows

I am 1 week into HA so forgive my NOOB question if it seems obvious as I did not see a solution to my scenario posted.

I have an integrated calendar that I would like to create a trigger 30 minutes prior to the end of the event if there is not an event immediately following. I assume there is a way to look to the schedule beyond the current event somehow but I haven’t figured out how to do that yet.

Note: All of my events are in 60 minute increments between 1 and 4 hours and start/end at the top of the hour. No overlapping events.

Thanks!

if i understand it right,this should be doable.

set an automation to trigger at -00:30:00 offset from end of event

in the actions call calendar.get_events to try to load any event that’s active in now()+timedelta(minutes=30)

info about how to do those are here:

most of it can be done via the UI w/o dropping down yaml/code level. i don’t know what your expertise level is but hopefully that gives you enough to get going. holler if you need more help.

Thank you, I will give it a go and keep you posted.