Google Apps Script Project with Google Calendar
Extract events on your calendar to make a list on a spreadsheet.
This is NOT coding from scratch. This is a getting started with Google Apps Script project. The template has the code.
- Make a copy of the template by going to alicekeeler.com/calscript and making a copy when prompted.
- Use the Tools menu and choose “Script editor.”
I have inserted some comments (think post it notes) into the code to help explain what the code is doing.
Read the comments (they are in yellow).
- First thing you need is the calendar ID from the Google Calendar that you want to extract a list of the calendar events from. This is the trickiest part of this project. Go to calendar.google.com and locate your list of calendars on the left hand side. Notice if you hover over a calendar that there is a tiny triangle. Click on that and choose “Calendar settings.”
- Locate the “Calendar Address.” If this is your default calendar it is just your email, so easy! If it is an additional calendar it is funky looking (email@example.com.) Copy this.
- Back in the code! You will want to delete the words PUT CALENDAR ID HERE FROM CALENDAR SETTINGS
But leave the single quotes! Those are important.
- Paste the Calendar ID in place of the text. Make sure there are single quotes around it.
- Change the dates. Look at your calendar, put some events on the calendar or look for a date range that has some events. This project is not that cool if you do not have any events to extract 🙂
Look at line 9 in the code and change the start date. Notice the pattern for how the dates are written.
Also, notice that the dates are in between single quotations.
- Do not change any more code. Look at the rest of the code, but do not touch it.
- Save the code. Press the disk icon in the toolbar. (For those of you under the age of 20, it’s a square with a circle on it.)
- Run the code by pressing the sideways triangle icon in the toolbar.
- Toggle back to the spreadsheet. The code should insert a sheet and provide you your calendar details.