Welcome! By using this program you assume responsibility for your calendar. Please contact me at roushil.satta@gmail.com for any questions.
For students whose schools run on calendars that have alternate between A days and B days, putting classes on google calendar isn't automatically possible. That's because google's custom rules aren't powerful enough to do this. That's why I developed this program on google apps script. It will allow you put each class on your calendar individually.
Go to the generalUse.gs file. Then, copy the entire thing and go to Google Apps Script. From there, create a new project. Now, clear the code window and paste.
You will need to put some general information as well as some class-by-class information into each variable for the program to run.
This allows the program access to your calendar. It allows it to make changes.
To find your calendarID, first open up Google Calendar, and locate the myCalendars section. Click on the three dots next to the calendar that you want to modify, then go to settings and sharing. Scroll down until you see the Integrate Calendar section. Right under it should be your calendar id. It will often be in the form of an email link. Copy your calendar id.
Now, go back to the program. Paste your calendar id into the quotes after the equals sign on var calendarId = "";.
For startDashDate, put the date that you would like to start the class. For example, if the first day of school is an A day and starts on August 27th, 2025, I will put between the quotes 2025-8-27. For B day classes, they will start the day after, on August 28th, 2025. So for B day classes, I will enter 2025-8-28.
For endDashDate, put the date that the class ends. For example, if the last day of school is on June 11th, 2026, I will add 2026-6-11 between the quotation marks.
These two should be fairly obvious. Add your class name between the quotes. Same for the class description. Some suggestions I have are class room number, class code, teacher name, and so on.
Google calendar has a number based system for what the physical color is in the calendar. Here is a list of all the color-number pairs. Remember, keep the number in quotes.
The following variables will be number based, meaning that you should not put them in quotes.
For startHours, you should take the hours of the time the class starts at. For example, if my class is at 10:30 AM, I will put 10 for this category. Please note that there is a 24 hour system in place. So, if my class was at 2:30PM, I would put 14 for this variable.
Take the minutes of the time that the class starts at. For example, if the class starts at 10:30 AM, you should put 30.
For endHours, you should take the hours of the time the class ends at. For example, if my class ends at 10:30 AM, I will put 10 for this category. Please note that there is a 24 hour system in place. So, if my class ended at 2:30PM, I would put 14 for this variable.
Take the minutes of the time that the class ends at. For example, if the class ended at 10:30 AM, you should put 30.
Because every school system is different, you will need to input the days that there isn't school for students. For BSD, I have already set the correct, dates but you might need to replace them by finding them on your school's website. You will not need to include weekends as that is already accounted for. To replace them, be very careful of the format. If I didn't have school on March 13th, 2026 and April 4th, 2026, then I would replace what comes after the equals sign with
[ '2026-3-13', '2026-4-4' ]
Make sure that there aren't any zeroes preceding any single digits.
Congrats, you have finished setting up your first class. First save the program, with (Control + S), or pressing the floppy disk icon. Now all you have to do is run the program by pressing the run button. Before you are allowed to run it though, you will have to grant a few permissions that google will take you through. After it says excecution completed, check your google calendar to make sure it works.
- it's quite easy to mess up on accident. For this reason, I would reccomend making your end date close to the start date as a test, where you can still manually delete them and start over.
- You will not be able to delete all the events at once. Instead, you'll have to manually delete them at once. It takes a long time. If this happens to you and you want to fix it send me an email.
- Google Calendar may tell you that you are making too many events and stop the program, in which you will have to seek ahead in the calendar until you find when it left off. Then adjust the start date and restart the program.
- It will usually take a while for each class to run. However, if it's exceeding around 3 minutes for each one, there's a problem.