title: Automatically add a schedule from Google Sheets into Calendar using options to repeat daily, weekly, or monthly
body: <p>I have been working on some code to automatically schedule multiple events from a google sheet into a google calendar that includes the title, date, and options for repeating events (daily, weekly, monthly). In other words, for each event input into the sheet, I want the option to type or select if each event will repeat daily, weekly, or monthly.</p>
  <p>Counseling, 2/10/2022, Monthly</p>
  <p>Tutoring, 2/10/2022, Weekly</p>
  <p>Everything works as far as scheduling the event in Calendar; however, it does not set the event to repeat. Is there a way to to indicate on the sheet how you would like the event to repeat, that then syncs to the Calendar? This is where I am with the code:</p>
  <pre><code>    function onOpen() {
    var ui = SpreadsheetApp.getUi();
    ui.createMenu('Sync to Calendar')
        .addItem('Sync Now', 'scheduleSafetyPlan')
        .addToUi();
      }
      
  function scheduleSafetyPlan() {
    var ss = SpreadsheetApp.getActive();
    var spreadsheet = ss.getSheetByName(&quot;Safety Plan&quot;);
    var calendarId = spreadsheet.getRange(&quot;F1&quot;).getValues();
    var eventCal = CalendarApp.getCalendarById(calendarId);
  
    var signups = spreadsheet.getRange(&quot;B3:D15&quot;).getValues();
  
    for (x=0; x&lt;signups.length; x++) {
      
      var shift = signups[x];
     
      var title = shift[0];
      var startDate = shift[1];
      var recurrence = shift[2];
      if (title &amp;&amp; startDate &amp;&amp; recurrence) {
      eventCal.createAllDayEvent(title, startDate, recurrence);
      
  }
  }
  }
  </code></pre>