I just read this great tip on MacOSXtips.co.uk: You can write AppleScripts to act as plugins for Google Notifier. Your script takes this form:
on NewMessagesReceived(messages, fullCount) -- Your code goes here... end NewMessagesReceived
To install, simply copy the script (plugin) to Library/Application Support/Gmail Notifier (create the directory if it doesn’t exist), and restart the Gmail Notifier.
I haven’t done one yet, but I’m certainly going to try.