Author: By Raj
Part of our Google Workspace Automation guides. Need this built for your team? Hire a Google Apps Script developer.
Estimated reading time: 10 minutes
Create & Update Google Calendar Events from Apps Script
CalendarApp creates events, invites guests, and sets recurrence for training sessions, onboarding, and resource booking sourced from Sheets rosters.
Bulk create from rows with createEvent(title, start, end, {guests, description, location}). Use eventId column to update instead of duplicate on reruns.
Advanced Calendar API adds freebusy queries for scheduling assistants, enable when CalendarApp lacks method you need.
Bulk create from Sheets
Parse date cells with timezone Session.getScriptTimeZone(). All-day events use createAllDayEvent.
Guest list from comma-separated emails column, validate with simple regex before invite.
Update and cancel
Store event.getId() in Sheet. On cancel status, call CalendarApp.getEventById(id).deleteEvent().
Moves reschedule with setTime(start, end) if only time changes.
Room resources
Resource calendars bookable as attendees if admin configured. Test in sandbox calendar before prod.
Avoid double-booking with pre-check freebusy via API.
Reminders and notifications
Default guest email invites sent when createEvent options include sendInvites true.
SMS not native, use Slack alert instead for urgent reminders.
Example code
function syncEventsFromSheet() {
const rows = SpreadsheetApp.getActive().getSheetByName('Schedule').getDataRange().getValues();
rows.shift();
const cal = CalendarApp.getDefaultCalendar();
rows.forEach(function (r) {
if (!r[0] || r[5]) return;
const ev = cal.createEvent(r[1], new Date(r[2]), new Date(r[3]), { guests: r[4], location: r[6] });
r[5] = ev.getId();
});
}| Approach | Best for | Tradeoff |
|---|---|---|
| Apps Script native | Google Workspace-centric workflows | 6-min limit, quotas |
| Zapier / Make | No-code, many connectors | Per-task cost, vendor lock-in |
| Python + Cloud | Heavy data / ML | Hosting cost, separate auth |
| Google Workspace automation | Production custom logic | Build cost, you own code |
FAQ
Which calendar?
getDefaultCalendar() uses script owner, specify openById for shared team calendars.
Recurring events?
createEvent with recurrence using RRULE via Advanced API, CalendarApp basic recurrence limited.
Timezone bugs?
Always construct dates with explicit timezone utilities.formatDate for display columns.
Guest declined?
Advanced API reads guest status, CalendarApp basic may not, upgrade API if needed.
Video conference links?
Meet links auto with Workspace settings or add conferenceData via Advanced API.
Need this done for you? I handle this as part of my consulting work, fixed-price quote within 24 hours.
Book a call with Raj →Get the full Create & Update Google Calendar Events from Apps Script script template
I'll email you a production-ready, commented version you can deploy in 10 minutes.
Continue reading
Gmail, Drive & Workspace
Sync Google Calendar to Sheets: Events and Availability
Gmail, Drive & Workspace
Sync Google Calendar with Microsoft Outlook (Apps Script + Graph)
Gmail, Drive & Workspace
Gmail Automation with Google Apps Script: Filters, Labels & Auto-Reply
From another topic
How to Automate Google Sheets with Apps Script (Beginner Guide) →Need help with this? I handle this as part of my Google Workspace Automation service.
Gmail, Drive, Docs, Forms, and Calendar automation.
See how it works →