Create Calendar Event When Form Submitted

Learn how to automatically create a Google Calendar event when a Google Form is submitted, scheduling a review session one week later using Google Apps Script.

If we wanna create a calendar event, every time a form is submitted, in this particular case, we're getting just an email and we're saying, Hey, we're gonna schedule a review session one week later than whenever this is submitted. So we are just getting an email address. We need to go to our our sheet, go up to Extension's app script , and we're gonna do this in two parts. The first part is we're going to create a function called Create Cal Event, and the second part is we're going to add it as a trigger on form. Submit. When that happens, we're going to get this event. Variable that has some interesting data in it, such as the, all of the values when submitted. We're going to get a constant email equals event that named values , and these named Weekly Email Sheet as Lead Magnet How to Send Google Forms Entries Automatically with Apps Script Email form entries when form filled out 2 Forms 1 Sheet

values are exactly what's written here in the name email, and we're gonna put that in quotes, email, and let's look at that. And we're gonna need that email when we're sending an all day event, seven days in the future. So let's get today's date as well. Cons, date equals new date. Cons, review date equals. New date. Date plus seven. We will need date dot get date. Plus seven. There we go. Then we're gonna need our calendar. Cons Calendar or cal equals calendar app. Do get default calendar. That's just as the owner of the sheet. Whatever Google Workspace account we're in, get the default calendar Google Sheets Interface Changes Google Sheets Interface Changes How To Create Google Calendar Events in Google Sheets

and then now we're gonna create a calendar event. Cal dot. Create all day event and we need just a few things. We'll say review session as the title. We'll say review date as the date, and then we have some options in. Curly brackets. We're gonna say guess colon, email, whatever. Email we get up here. That's our guest, actually. Guest with an S. And we might not need to send invites, so we'll do send invites, comma, false. Save all of this. And the second part of this is that we have to go over to the left side. Click triggers. Once that loads, we'll go to the bottom right click add trigger . We'll select which function we are wanting to run from spreadsheet and on event type, we will select on form, submit, click save. Automated Project Management in Google Sheets Email Yourself a Cell from a Google Sheet, Every Day How To Create Google Calendar Events in Google Sheets

At this moment, we'll have to authorize, click, allow. And now we should see this trigger here. If we wanna delete it, we can click the three dots here and click delete trigger . But if we want to edit it, just go over to the editor and edit it. We don't have to delete, edit, and save again, but we do have to edit and save. Let's submit. We had an invalid argument at line eight. Probably, I think I know why. Let's see. Line eight is this review date. Let's see if it's just date plus seven. Might have to wrap that in new date. Let's try to get just this first one here. Maybe it's this email that's having an issue. Yeah, it was that email that was having the issue, so it's just zero, but this date actually needs to be. Date dot get date plus seven, or it's going to just add like seven Email Certain Department Based on Google Form Entries Writer Better Prompts How to Prevent Delete Tab

seconds and be on today's date. So we need this a week later, so this is going to be what we need. Let's run it again so this date is wrong. We need to actually. Do two, two steps here. We need to create a new date and then change this review date dot set date to review date dot get date plus seven. Let's save that. So now the setting of the date sets it as a date, seven days in advance. We submitted another one. Let's check our calendar and this is one week from now we have a review session with that email that we set up. Very cool. Hopefully you enjoyed this here's the full code. If you'd like it, pause now and get it right now. Richard Asks: Copy Template Tab and Rename to Date Every Week How To Highlight Any Date One Week In Future

are watching better sheets here on YouTube. Make sure you check out this video or this video and subscribe right now to get more tips, tricks, how tos, get more out of your Google sheets than you ever have before. I'm excited to be making a ton more videos here. Ask me questions down in the comments and I will answer them in future videos. But for right now, right here, one of these videos is gonna be your next Google sheet. Better Sheets Videos Checklist Absolute Basics of Google Sheets How To Sell Google Sheets For Fun And Profit Start Sheeting Better in 2026