Notification force-click action

I was wondering if it'd be possible to force-click on the macOS notification bubble to run a particular command?

For example, I'd like to force-click on the Apple Mail notification in order to delete the email right away.

Thoughts, ideas?