Not really, but with a little effort you could probably get Automater to do this. You'd have to combine it with some program that lets you mount your Gmail as if it were a remote network drive, and so there's going to be a number of potential pitfalls when it comes to the reliability of your home grown cobbled together system.

I can't say for certain whether or not there's anything similar, but you may want to try looking into alternative IM clients like Adium or Trillian. You may well have better luck finding something to do what you want with those.