Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

202
Visualizações
Google Apps Script- Get Guest List from Calendar

I am having a hard time finding a way to get the emails of all the partecipants in the next events on my calendar.

I only get the email of only one partecipant

The final idea should be to color code the calendar based on who is in the meetings.

Here's what I got so far


  var today = new Date();
  var nextweek = new Date();
  nextweek.setDate(nextweek.getDate() + 7);
  Logger.log(today + " " + nextweek);

  var calendars = CalendarApp.getAllOwnedCalendars(); 
  Logger.log("found number of calendars: " + calendars.length); 



  for (var i=0; i<calendars.length; i++) { 
    var calendar = calendars[i];           
    var events = calendar.getEvents(today, nextweek); 
    for (var j=0; j<events.length; j++) {
      var e = events[j];
      var title = e.getTitle();
      var guestlist=events[j].getGuestList();
      var details=guestlist[j].getEmail();


        if (details == "example0@gmail.com") {
        e.setColor(CalendarApp.EventColor.CYAN);
      }
      if (details == "example1@gmail.com") {
        e.setColor(CalendarApp.EventColor.YELLOW);
      }
      if (details == 'example2@gmail.com') {
        e.setColor(CalendarApp.EventColor.GREEN);
      }
    }
  }
} ```


about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda