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

192
Vistas
Add a reminder to an existing google calendar event using the Advanced Calendar Services using Apps Script

I'm new to Javascript and Stackoverflow. We Recently migrated from Microsoft Exchange to Gmail and I'm trying to automate some of the team processes to make them more user friendly and manageable. One of those is Time-Off requests. With the help the community here I was able to write a Google Apps Script that updates the shared team calendar with Time-Off requests. For a new request I create a calendar event colored yellow, as free so it doesn't block time in the calendar, and with no reminders (which is how I want it). Once the request is approved I update the event color to green, from free to busy and add a reminder. Everything works great except reminders. I tried many approaches but nothing works... Here's the relevant code. Any help is much appreciated!! PS. I'm using the Advanced Calendar Services

if ((requestStatus == "Approved") || (eventStatus == "confirmed")) {
  var eventReminders = "{method: email, minutes: 900}";
  } else {
  var eventReminders = null;  //No reminders
}
  //var eventReminders = setEventReminders(requestStatus); //set calendar reminders

  // Compose event details based on the data read from the relevant row in the sheet
  var newEvent = {
    summary: 'Time-Off (' + requestStatus + ') ' + requestorName,
    description: eventDescription,
    colorId: colorE,
    transparency: eventTransparency,
    reminders: { 
      useDefault: false, 
      overrides: [ 
        eventReminders 
        ]
    },
    start: {
      date : startDate //use date instead of dateTime to create full day event so the event will pin on the top of the calendar
    },
    end: {
      date : endDate
    },
    attendees: [
      {email: requestorEmail}
    ]
  };
  //Create the event in the calendar  
  updateCalendar (eventAction, newEvent, rowE, eventRequestID);
}

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