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.
Start a new script
Go to script.google.com, click New project and name it Week ahead.
Set your time zone
Click the gear icon (Project Settings) and set the time zone to where you live, so event times are right.
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 + ' ' + 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, }); }Run it once and allow access
Click Run and allow access to your calendar and email. Check your inbox for the summary.
Send it every Monday
Open Triggers, click Add trigger, choose
sendWeekAhead, Time-driven, Week timer, Every Monday, 6 am to 7 am, and save.
Paste this into Claude Code, Codex or any coding agent. The agent writes and sets up the automation, then tells you what to click.
Write a Google Apps Script that emails me my week ahead every Monday morning. - Include events for the next 7 days from my default calendar plus any other calendars I list at the top of the script. - Group by day, show start-end times (or "All day"), location if set, and mark days with more than 5 hours of meetings. - Escape event titles properly in the HTML email. - Use my calendar's time zone, add a weekly trigger for Monday 6-7 am, and tell me where to paste it on script.google.com and what to click.
You still need to
- Sign in to Google and click Allow when the script first runs.
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.