What is a good way to notify HomeAssistant of MacOS/Linux events?

I did set up an automation to mute my media player, when receiving a phone call (via FritzBox call monitor). It works great, but now I would like to do the same with MacOS’ FaceTime, i.e. mute my receiver, when I receive a FaceTime call on my MacBook.
What would be a good approach to achieve this? Has anyone done similar integrations before?