Run action when device is detached
//////////////////////////////////////////////////////////////////////////////
EDIT: Upon rereading the question, I see that my answer was actually off topic.
//////////////////////////////////////////////////////////////////////////////
I have a solution for what you would like to do. It's actually really simple, but it would be to difficult for me to explain it in writing so I recorded a videos for you.
Trigger a USB event using Apple's Automator app
:)
PS. In the video I talk about UBS devices because I didn't realize you wanted this to work for Thunderbolt. But I'm pretty sure the solution will still work just as well for Thunderbolt. :)