3 Comments
User's avatar
Zack's avatar

Michael, this is great! Any small tweaks to simply add emails to an event in Google Calendar that already exists? Idea being people submit info through forms -> sheets, who I then want to automatically add to an event that is already scheduled.

Expand full comment
Michael Huskey's avatar

I'm sure there is a way to have it as someone fills out a Google Form to add them to an event.

I don't know if this will work, but I tossed your question into an LLM and got this back as a response:

function addEmailToCalendarInvite(e) {

var formResponse = e.response;

var userEmail = formResponse.getRespondentEmail();

var calendarId = 'your-calendar-id@group.calendar.google.com'; // Replace with your calendar ID

var eventId = 'your-event-id'; // Replace with your event ID

var calendar = CalendarApp.getCalendarById(calendarId);

var event = calendar.getEventSeriesById(eventId);

event.addGuest(userEmail);

}

Expand full comment
Zack's avatar

Thanks for the response Michael!

Actually, the email info would already populate Sheets from a Form, its just getting that email from Sheets directly into an event in Google calendar.

Expand full comment