Crawl all appointments in calendar, alert when appointment contains "birthday"

Hi all,

I’ve been looking through the Internet and even Microsoft copilot, but none had a working solution for my rather easy plan:

I have all birthdays in my Google calendar, and my calendar properly syncs with HA. So far, so good.

Now, my new plan is to have a card on my dashboard for when there is a birthday today, and a button to quit that notification. I thought it should be easy to create an automation that runs every day at 1am that iterates through the appointments and performs a string comparison, but I couldn’t find anything on how to read all calendar events :cry:

Similarly, I wanted to create an automation that does almost the same, but for today and tomorrow.

Anybody having a suggestion or solution what to do here? :heart::heart:

Does this blueprint help?

1 Like

If you want to build this yourself it would be fairly simple. Use this action to return all calendar events between two dates:

You can test it out in developer tools → actions.

Once you get a response you like, click the “copy to clipboard (template)” button, then go to the “template” tab and paste it into the template editor.

Now you can figure out what template you need to determine if one of the entries contains the word “birthday”. Here’s one to get you started:

{{ action_response['calendar.your_calendar_entity']['events'] | map(attribute='summary') | select('search', 'birthday', ignorecase=True) | list }}

At the end, replace list with count > 0 if you just want to return true or false.

1 Like

Thanks, that worked like a charm!