I've been using RSS2Email to turn Gmail into Google Reader.
I'd like to create a Google Apps Script to do this instead, to get two advantages:
The scheduling would be handled by Google Apps Script. (No need to have a dedicated computer to run the script.)
The resulting emails would be labeled per-feed, nicely organizing things.
Using Google Apps Script would be the same implementation spirit as e.g. Gmail Snooze.
I understand how to fetch the feeds. Where I'm stuck is how to create the emails using a specific label. The approaches I've investigated so far:
- The Gmail Service for Google Apps Scripts doesn't allow this, at least not obviously.
GmailApp.sendEmail
doesn't let you specify a label. Which makes sense since this is for generic email sending. But ...GmailApp.sendEmail
returnsGmailApp
, not something you could use to ID the message and change its label later.- The service also doesn't appear to let you create Gmail filters programatically, ruling out another possible way to tackle this.
- The Gmail Migration API would be perfect to do this -- but it doesn't work for normal, consumer Gmail accounts. Gah.
- Google's IMAP extensions might allow this, but it's unclear to me.
I suppose I could use 1, putting some UID in the Subject that I could use to look up the delivered message, to add the label (and hopefully un-uglify the Subject by removing the UID). But that seems a bit kludgy.
Using 3, IMAP extensions, seems possibly less kludgy, although probably much more work to code and test.
Any recommendations among these? Is there some other API or strategy?