This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // トリガー設定で1時間毎ぐらいに起動する | |
| function myFunction() { | |
| threads = GmailApp.search('label:kin is:unread') // ラベルはフィルタ設定でつける | |
| if (threads.length == 0) { | |
| return | |
| } | |
| message = threads[0].getMessages()[0] // どの一通でも通知されれば見にいくので | |
| text = "メールだよ\n" + message.getFrom() + "\n「" + message.getSubject() + "」" |
OlderNewer