This is exactly the video I’ve been looking for, for about a week now! Thanks for sharing your knowledge. How hard would it be to allow me to choose which calendar to create the event in, based on a selection in the form?
@@DdgeluvinHic Excellent! That should work, though I haven't tested it. If you add a final question in the form with a short answer prompting people to put in the calendar id, you should then be able to then use that form response instead of hard coding the calendar id in the apps script. I added the following comments to the apps script file if you want to check out and use in your own form: // to use different calendar id based on response // let calendarId = responses[6].getResponse() // then use calendarId instead of hardcoding the string on line 19 below // CalendarApp.getCalendarById(calendarId)
Great tutorial and explanation! I was struggling to parse the responses with exact names from the consol log from the browser. This seems to be much easier. In my case however I had to make some changes, but the scructure seems to be working.
Thank a lot Eamonn! It could be lot useful.. Just a question: from the last part of the video, when you set your calendarID for send invitation, if a person submit his calendarID is it possible to send invitation to his calendar? So, if I'm not wrong, I'd like to treat calendarID as variable.. thanks a lot again
You could use a variable for calendarID, yes. But when you send an invite to a guest, it will be added to that guest's calendar anyway. So, in the setup I had, the event was added to my chosen calendarID and also that fnashow's calendar once the fnashow accepted the invite.
This is doable, I think, but outside the scope of what I've built so far. You'd need for your code to first pull in the calendar date, check for existing events, and then run the code I've written only if there wasn't an event there already. Certainly doable, would just take some extra legwork to setup.
Thanks for the tutorial! Worked great! However, I am struggling to add a description to the event, based on a response. Could that be done? I'm searching the web and not getting anything! Thanks!
Yes, the description, location and guest invites are all optional parameters. Check out this video I did on creating events from a spreadsheet using apps script. The technique is the same although I'm in Google Sheets rather than forms. The optional parameters start around 6min30sec ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FDkKIFyaYC4.htmlsi=4vSJWQxcdA0OwxmE
Hi Eamonn, I saw some videos of yours, but I am still struggling to get the Apps Script working. I have this really simple form to log my lunches and diners (like a meal planner). The form asks for the event (what did you eat), the date and start time of the meal, with who did you eat and where. I also made a Google sheet that collects all the answers. I copied some of your lines, but it just doesn't go as planned and I cant get tings to work. Can you help me out?
as addition: who;s for dinner is just a line to fit in the description, no need to send invitations. It would be the easiest to do it from the Google sheet, and I am working with the one with the ticked boxes...
hey I encountered a problem with the code and it says that a TypeError: Cannot read properties of undefined (reading 'getItemResponses'). I am not a familiar with coding but I want to use the same code but its having problems. Can you help me?
That usually means that there aren't any responses for it to use. Did you set it up on a trigger so that the code runs after the form is submitted and has responses to do stuff with? I may be able to help troubleshoot more if you share your form with me to check out.
You could set it up as an all day event, but you'd just modify a bit of the code because it's a different method in apps script. Check out this walkthrough I did (it's going from sheets to calendar, but you can see the names of the methods you'd need to be using. I think it would actually be a little simpler since you wouldn't need all the times in addition to the dates.. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FDkKIFyaYC4.html
What do you mean exactly? The form submission triggers the code that will add the event to the calendar. You can alternatively receive submissions in a Google spreadsheet.