Save Gmail Messages to a Google Spreadsheet

The Google Script from @oshliaer will save the body of email messages from Gmail to the currently active worksheet inside Google Spreadsheet. You need to specify the Gmail search query and the sheet ID where the matching messages are to be exported. It saves the text content of the message sans any HTML tags or images.

To get started, paste the code in the script editor of a Google Spreadsheet and run SaveEmail from the Run menu.

Also see: Save Gmail Attachment to Google Drive