0

I'm trying to connect my google sheets to google calendar. The thing is: I have multiple movies that are going to release in the future and I want to have them in my google calendar. The problem is that these movies are releasing in multiple regions and I need different calendars for every region (LATAM, Caribe and Brazil). Just to let you know, I cannot separate them into different rows. Also, I would like the calendar to update automatically if possible. enter image description here

function createCalendarEvent() {
  let communityCalendar = CalendarApp.getCalendarById("622671516d6be59ea9b3160169be6a0bc330b0ea21a453f9be2670fca70eea2f@group.calendar.google.com");
  let sheet = SpreadsheetApp.getActiveSpreadsheet();

  let schedule = sheet.getDataRange().getValues();
  schedule.splice(0,2);

  schedule.forEach(function(entry) {
  communityCalendar.createEvent(entry[1], entry[0], entry[0]);
});
}

I know this is not 100% right considering I have to use "if" however, I don't know what to do with the regions thing. Please help me.

0 Answers0