Skip to content

Instantly share code, notes, and snippets.

// ===== 設定 =====
// プロジェクトの設定 → スクリプトプロパティ で MAIL_TO に親メアドを設定
// 複数宛先はカンマ区切り: 'a@example.com,b@example.com'
function checkClassroom() {
const props = PropertiesService.getScriptProperties();
const lastRun = new Date(props.getProperty('LAST_RUN') || (Date.now() - 24*60*60*1000));
const now = new Date();
const mailTo = props.getProperty('MAIL_TO');