I'm working for a non-profit and they want me to schedule their google calendar in such a way that once you create one event, let's say event A, it should automatically create events B,C,D and E.
For example- If I create an event "Anne's birthday", then the calendar should automatically create events (or sub-events) like Birthday plan meeting 1 week before the due date as event "B", Cake order 4 days before the due date as event "C", Party prep Shopping 2 days before as event "D" and Contacting invitees 1 day before as event "E" at specified dates and times before the due date and should be applicable for all similar future events.
You should create a trigger event in your script that will fire your function when a new event is added to your calendar.
In order to do that, you have to synchronize your script to your calendar. You can follow these steps:
You have to store this nextSyncToken somewhere. I have used a spreadsheet for that in this sample, but you can use a database or whatever suits you (actually a spreadsheet is not the most secure way to store data, so I'd recommend using something else).
I hope this is useful to you!