Skip to content

Instantly share code, notes, and snippets.

@danicholls
danicholls / Starred_Email_Digest.gs
Last active February 23, 2022 16:45
I cobbled together a lot of disparate notes on Google Scripts to send a summary email of the emails I had starred, so they could be followed up on, and to control the subscription list by a Google Sheet. Don't need it anymore, but in case someone does, it's at least a good place to start. NOTE: LOOK FOR and do TODOs.
// This didn't seem to work on its own; set trigger via Apps Script interface.
// ScriptApp.newTrigger('bottleTheStars').timeBased().everyWeeks(1).onWeekDay(ScriptApp.WeekDay.MONDAY).atHour(4)
function bottleTheStars() {
const max = 20
let noHtml = `Below are the ${ max } latest unresolved email threads (still starred).
The link should take you to a search that will contain the thread (and hopefully only that thread).
`