Need help for Alert Notification javascript or apple script

Hello i'm new here and actually i need someone who can help me out of my context.

I wanted to create notification pop up when i want to send an email, the result is it will detect if i had attach some file or not (something like if there isn't any file attach, it will showing up notification for example "Please attach a file", and the notification will disappear when there is attachment).

It's possible to create that ? If yes, what should i choose, i mean it's best using javascript or its can run with apple script ? And can someone create the script for me, because im not a programmer.

Thank you so much