Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!