1

I am able to get all my events by doing the following:

function myFunction() {
  var cal = CalendarApp.getCalendarById(id);
  var events = cal.getEvents(startTime, endTime);
  for ( var i in events ) {
    var id = events[i].getId();
  }
}

The issue is that all events that are part of a recurring event have the same id. How can I get the instanceId of my events?

I am using google apps script

How can I solve that?

Thanks

lu.c.n
  • 31
  • 5
  • See this post, it is a solution. I use it but instead of comparing the title I compare on ID. Works great although a bit slow... http://stackoverflow.com/questions/36116491/how-to-modify-a-specific-instance-of-an-event-series – Serge insas Apr 01 '16 at 23:04

1 Answers1

0

What exactly are you going to do with the ids retrieved? You cannot retrieve recurring event instanceId using google-apps script alone.

You can try to use the Google Calendar API itself to make a GET http requests

https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId/instances

You will just need to use your calendarId and the recurring eventId. This is will give a JSON response with event representations which probably contains id that you need.

SwagBomb
  • 584
  • 3
  • 7