Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

198
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda