Google-sheets – How to extract information from the subject line and add to Google Sheets

gmailgoogle sheets

I'd like to be able to extract tasks from the subject line of an email in Gmail (using some sort of custom syntax) and then insert the task as a row in a shared Google Sheets.

Currently the best way I've thought of doing this would be to write a Gmail Contextual Gadget. The main downside to this is that I'd have to start using Google Apps just to get this functionality.

Are there any other ways to achieve this?

Also, does anyone know if Gmail Contextual Gadgets work on Google Apps or does it require the Google Apps for Business?

Best Answer

As long as you don't need to parse the contents of the subject line, you can do this with If This Then That.

You'll need the Gmail and Google Drive channels. Specifically:

Trigger

Depending on how you're going to identify the incoming message, you'll use one of the following triggers:

  • Any new email in inbox
  • New email in inbox from
  • New starred email in inbox
  • New email in inbox labeled
  • New email in inbox from search

"Subject" is one of the ingredients available, which you'll obviously need. There's other useful things, like "ReceivedAt".

Action

You'll want Add row to spreadsheet where you'll defined the name of the spreadsheet, what goes in the row, and the folder path in Google Drive where it's located.

There are several recipes already shared that might service. This recipe, for instance, saves a new row for every received message.