I would like to know if there is a way that I could have specific messages in my email to go directly in a Google spreadsheet. For example I need all email messages with subject line of "X" be stored in the spreadsheet.

2 Answers 2


You can add a Google Script inside the spreadsheet that looks something like this:

function save() { 
 var ss = SpreadsheetApp.getActiveSheet();
 var threads = GmailApp.search("subject:X");
 for (var t in threads)
  • This works, changing subject:X to change the X as required Commented Jul 13, 2014 at 20:16

IFTTT looks like it can meet your needs. Specifically, this recipe: Add receipts & orders to Receipt Spreadsheet. (There are also other similar recipes.)

This recipe is triggered by a new email message with particular words in the subject, and adds a row to a specific spreadsheet.

You'd just need to customize it to your specifications.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.