Search code examples
google-apps-scriptgmail

Save a GMail to Google Doc keeping the same appearance


I'm trying to save a email (from GMail), that has some fancy things, like different font colors and etc that can be done using GMail(And that are understood by GMail).

But when I save the email to a Doc, I see that it uses HTML(I think), so wanted to know if there is already a Google Script to convert the GMail fancy things to a Google Docs fancy thing =)

I'm new to Google Scripts, and still having some problem finding some references, so if there is already a Script for this, then could anyone tell me?

Thanks.


Solution

  • AFAIK there's no such script. What you can do that will probably work better is to get the emails html and send it to Google Docs List Data API via UrlFetch and have it convert to the Google Documents format for you. That is probably way better than trying to do a "conversion" on the script directly.

    Such script is also more likely to have been implemented already, but I haven't done it myself yet.