0
votes

I am using Google Calendar API to create/modify recurring events

for e.g. - there is an event (Say ABC) having recurring events on Monday, Wednesday & Thursday till 31st January 2021 (say 30 occurrences). While creating this event, I calculated number of US holidays coming in this schedule (suppose 1) and increased the COUNT by that number (which will be now 31) and later delete those instances which were occurring those holidays (like 26th Nov, 27th Nov, 24th December etc). Everything works fine till here.

Now I've to add an attendee to this event which I'm able to do by sending a PATCH request (reference) with updated attendees list. This updates the attendees list but it undo's the instances that I deleted. I want recurring event to remain as it is.

TIA

1

1 Answers

0
votes
  • After succesfully deleting the spare event instances, you should be able to add invitees to the non-deleted instance by specifying the recurringEventId as eventId
  • If for whatever reason this is not working as intended you can perform the following workaround:
    • Use the method Events: instances with the option showDeleted:false to retrieve the ids of all not deleted event recurrences
    • Use the method Events: patch in a loop specifying as eventId all single event ids retrieved in the step above

Mind:

While the recurringEventId should look something like qgthctibhb7755q02hnm3cdb3s, the id of each single instance should look something like qgthctibhb7755q02hnm3cdb3s_20201104 (the date is included in the id)