Hi @Airy!
This is cool, and thanks for sharing — but this is also almost strange: About a couple of days ago, I made a macro with its core functionality overlapping this one.
But as you point out, there has been interest in this forum for such functionality, so I guess the idea was incepted™ in us in some similar way. Anyways, I have also been really interested in having notification presence/content as a trigger or condition, so I spent a couple of days on this earlier this week.
My take consists of 1) an Apple Script "applet" that triggers the macro based on screen presence of Notification Center Dialog Window; and 2) a macro that finds the boundaries of the (topmost) notification, OCRs its content, and logs it with timecode as a single line in a global variable.
I had anyway planned on sharing it, and thought about posting it here in this thread, but I chose to post it as a separate Tips & Tricks post instead of posting it here. But have a look, there are some really cool ideas there — in my view anyways, but I believe there are interesting elements in there for you as well