Runs: Every Monday

Get your week's calendar in one email on Monday morning

Start each week with a single email listing everything on your calendar for the next seven days, grouped by day.

A calendar is easy to check and easy to forget to check. One email on Monday morning gives you the shape of the week before the week starts happening to you.

  1. Start a new script

    Go to script.google.com, click New project and name it Week ahead.

  2. Set your time zone

    Click the gear icon (Project Settings) and set the time zone to where you live, so event times are right.

  3. Paste the script

    Back in the editor, replace everything with this:

    function sendWeekAhead() {
      const start = new Date();
      const end = new Date(start.getTime() + 7 * 24 * 60 * 60 * 1000);
      const events = CalendarApp.getDefaultCalendar().getEvents(start, end);
      const tz = Session.getScriptTimeZone();
      let html = '';
      let lastDay = '';
      for (const event of events) {
        const day = Utilities.formatDate(event.getStartTime(), tz, 'EEEE d MMMM');
        if (day !== lastDay) {
          html += '<h3>' + day + '</h3>';
          lastDay = day;
        }
        const time = event.isAllDayEvent()
          ? 'All day'
          : Utilities.formatDate(event.getStartTime(), tz, 'HH:mm');
        html += '<p>' + time + ' &nbsp; ' + event.getTitle() + '</p>';
      }
      if (!html) html = '<p>Nothing on the calendar this week.</p>';
      MailApp.sendEmail({
        to: Session.getActiveUser().getEmail(),
        subject: 'Your week ahead',
        htmlBody: html,
      });
    }
    
  4. Run it once and allow access

    Click Run and allow access to your calendar and email. Check your inbox for the summary.

  5. Send it every Monday

    Open Triggers, click Add trigger, choose sendWeekAhead, Time-driven, Week timer, Every Monday, 6 am to 7 am, and save.

Things that trip people up

  • Only your main calendar is included. Shared or extra calendars need the agent version, or a change to the script.
  • If times look an hour or more off, the project's time zone (step 2) isn't set to yours.