====== Google Form-to-Calendar Sync ====== Go to form.google.com Create a form with these questions: * Event Title * Event Start Date and Time * Event End Date and Time * Event Location * Event Description * Add Guest Once done, go to Responses then click "View responses in sheets" Rename title of the sheets Go to tool>Script Editor Resources > Libraries Include moment.js Here's the key: MHMchiX6c1bwSqGM1PZiW_PxhMjh3Sh48 Type this code. ===== Code ===== var moment = Moment.load(); var GLOBAL = { //the id of the form we will use to create calendar events formId : "14WoTH-2Uq3tpqPpd2Z19S7OQjOyurri7GaVPsKZRg3w", //the id of the calendar we will create events on calendarId : "c7o2tni40kbp29of5902j2oabs@group.calendar.google.com", //a mapping of form item titles to sections of the calendar event formMap : { eventTitle: "Event Title", startTime : "Event Date and Start Time", endTime: "Event End Time", description: "Event Description", location: "Event Location", email: "Add Guests", }, } function onFormSubmit() { var eventObject = getFormResponse(); var event = createCalendarEvent(eventObject); } function getFormResponse() { // Get a form object by opening the form using the // form id stored in the GLOBAL variable object var form = FormApp.openById(GLOBAL.formId), //Get all responses from the form. //This method returns an array of form responses responses = form.getResponses(), //find the length of the responses array length = responses.length, //find the index of the most recent form response //since arrays are zero indexed, the last response //is the total number of responses minus one lastResponse = responses[length-1], //get an array of responses to every question item //within the form for which the respondent provided an answer itemResponses = lastResponse.getItemResponses(), //create an empty object to store data from the last //form response //that will be used to create a calendar event eventObject = {}; //Loop through each item response in the item response array for (var i = 0, x = itemResponses.length; i Interate Calendar, you will see the Calendar ID there.