Wednesday, June 12, 2013

Save Gmail Messages to Google Drive in a .pdf Format using App Script

When I found the app script from Marcello Scacchetti that saves your email to your Google Drive account I was elated!  My husband receives tons of purchase orders by email from his customers.

I was very disappointed in the way the App Script saves the email on the Google Drive account:  

Google Drive
  > Folder "Email Archive"
     >> Folder "Email1 Message Date + Sender +Subject +ID"
          >>> Email1 Message Date+Sender+Subject+ID.pdf
     >>Folder "Email 2 Message Date+Sender+Subject+ID"
          >>>Email2 Message Date+Sender+Subject+ID.pdf

Each email is saved within its own folder within the base folder.  This useful App Script proved to be fairly useless if I have to move each email out of a folder.  It took some time but I was finally able to rewrite the script to save email messages to my drive account is a more organized fashion for my taste.

Candy's App Script saves GMail messages like this:

Google Drive
>My Email
     >Email1 Message Subject.pdf
     >Email2 Message Subject.pdf
If you aren't familiar with Apps Script, it's okay.  All you need to do is open my Google Spreadsheet (the app script has already been added) and copy it onto your Google Drive account.  Then follow the steps in Marcello Scacchetti's blog since he does an excellent job of walking you through the steps.  I might add a walk through myself at a later time.

Hope Y'all Find This App Script Helpful!
 
Thank you to Marcello Scacchetti for the original script