Create Recurring Events

Apps Script supports creating recurring events using CalendarApp.createEventSeries(). You define a recurrence rule using CalendarApp.newRecurrence() and chain options like .addDailyRule(), .addWeeklyRule(), or .addMonthlyRule() to control the repeat pattern.

Creating a Daily Recurring Event

function createDailyStandup() { var calendar = CalendarApp.getDefaultCalendar(); var start = new Date("2024-04-01T09:00:00"); var end = new Date("2024-04-01T09:15:00"); var recurrence = CalendarApp.newRecurrence() .addDailyRule() .onlyOnWeekdays([ CalendarApp.Weekday.MONDAY, CalendarApp.Weekday.TUESDAY, CalendarApp.Weekday.WEDNESDAY, CalendarApp.Weekday.THURSDAY, CalendarApp.Weekday.FRIDAY ]) .until(new Date("2024-06-30")); var series = calendar.createEventSeries( "Acme Corp – Daily Sales Standup", start, end, recurrence, { description: "15-minute daily standup for the sales team." } ); Logger.log("Daily standup series created: " + series.getId()); }

Creating a Weekly Recurring Event

function createWeeklyPipelineReview() { var calendar = CalendarApp.getDefaultCalendar(); var start = new Date("2024-04-01T10:00:00"); // First Monday var end = new Date("2024-04-01T11:00:00"); var recurrence = CalendarApp.newRecurrence() .addWeeklyRule() .onlyOnWeekday(CalendarApp.Weekday.MONDAY) .until(new Date("2024-12-31")); var series = calendar.createEventSeries( "Weekly Pipeline Review – All Regions", start, end, recurrence, { description: "Weekly review of the Sales Tracker. Review In Progress and Closed deals.", guests: "[email protected],[email protected],[email protected]", sendInvites: true } ); Logger.log("Weekly review series created."); }

Creating a Monthly Check-In with Each Sales Rep

This example creates a recurring monthly 1

event for each sales rep:

function createMonthlyOneOnOnes() { var calendar = CalendarApp.getDefaultCalendar(); var repSchedule = [ { name: "Alex Martinez", email: "[email protected]", dayOfMonth: 5, hour: 10 }, { name: "Jordan Lee", email: "[email protected]", dayOfMonth: 10, hour: 14 }, { name: "Sam Rivera", email: "[email protected]", dayOfMonth: 15, hour: 11 } ]; repSchedule.forEach(function(rep) { var start = new Date(2024, 3, rep.dayOfMonth, rep.hour, 0, 0); // Month is 0-indexed var end = new Date(start.getTime() + 30 * 60 * 1000); // 30 min var recurrence = CalendarApp.newRecurrence() .addMonthlyRule() .until(new Date("2024-12-31")); var series = calendar.createEventSeries( "Monthly 1:1 – " + rep.name, start, end, recurrence, { guests: rep.email, sendInvites: true, description: "Monthly 1:1 check-in with " + rep.name + ". Review pipeline, blockers, and wins." } ); Logger.log("Monthly 1:1 created for: " + rep.name); }); }

Creating a Recurring Customer Check-In for Active Accounts

function createCustomerCheckIns() { var sheet = SpreadsheetApp .getActiveSpreadsheet() .getSheetByName("Sales Tracker"); var data = sheet.getRange(2, 1, sheet.getLastRow() - 1, 7).getValues(); var calendar = CalendarApp.getDefaultCalendar(); data.forEach(function(row, i) { var customerName = row[0]; var customerEmail = row[1]; var product = row[2]; var status = row[6]; if (status !== "Closed") return; // Stagger start dates so they don't all land on the same day var start = new Date(2024, 3, 1 + (i * 3), 15, 0, 0); var end = new Date(start.getTime() + 30 * 60 * 1000); var recurrence = CalendarApp.newRecurrence() .addMonthlyRule() .times(6); // 6 months of check-ins calendar.createEventSeries( "Monthly Check-in – " + customerName + " (" + product + ")", start, end, recurrence, { guests: customerEmail, sendInvites: true } ); Logger.log("Check-in series created for: " + customerName); }); }

Recurrence Rule Options Reference

MethodDescription
.addDailyRule()Repeats every day
.addWeeklyRule()Repeats every week
.addMonthlyRule()Repeats every month
.addYearlyRule()Repeats every year
.interval(n)Every n occurrences (e.g. every 2 weeks)
.times(n)Stop after n occurrences
.until(date)Stop on a specific date
.onlyOnWeekday(day)Only on a specific weekday
.onlyOnWeekdays([...])Only on specified weekdays