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)
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.
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.
Hi, This tutorial is great, but I have a question. After setting everything up, it works to send data from my form to my sheet and post my event to my calendar. However, the time from my form to my sheet and then to my calendar doesn’t match. I’ve tried a lot, but I can’t figure out what I did wrong. Do you have any idea what might be causing this?
I've run into this using Google stuff before too. There are different time zone settings in a bunch of different places. Check all of these to make sure they're the same - In the project settings in Apps Script and in the settings for the Calendar.
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.
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...
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.
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 th-cam.com/video/FDkKIFyaYC4/w-d-xo.htmlsi=4vSJWQxcdA0OwxmE
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.
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.. th-cam.com/video/FDkKIFyaYC4/w-d-xo.html
Here’s another apps script video with sheets and calendar:
th-cam.com/video/FDkKIFyaYC4/w-d-xo.html
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)
@@EamonnCottrell thanks man! I’m gonna give that shot. I’ll let you know how it goes.
hi, how to fix it for double booked reservation when form submitted.. or make it blocked the reservation that already booked ?
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.
hello brother, let me introduce myself from Indonesia, can you get coding like this video but for bidrtday?
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.
Hi,
This tutorial is great, but I have a question. After setting everything up, it works to send data from my form to my sheet and post my event to my calendar. However, the time from my form to my sheet and then to my calendar doesn’t match. I’ve tried a lot, but I can’t figure out what I did wrong. Do you have any idea what might be causing this?
I've run into this using Google stuff before too. There are different time zone settings in a bunch of different places. Check all of these to make sure they're the same - In the project settings in Apps Script and in the settings for the Calendar.
@@EamonnCottrell Thank you
繁體中文網頁無法使用
一直顯示 程式碼:5錯誤
好可惜, 感謝提供!
If you share your sheet, perhaps I can figure out what's going on.
how to have form event and spreadsheet event in the same file?
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.
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...
Shoot me an email w details and share them with me. I’ll take a look and see if we can’t figure it out. My full name at gmail
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.
Awesome! Glad you’ve got it working 👍
But if events overlapping?
It will create overlapping events just like you can do manually on the google calendar.
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 th-cam.com/video/FDkKIFyaYC4/w-d-xo.htmlsi=4vSJWQxcdA0OwxmE
@@EamonnCottrell i wantched second vedio and tried but not unable to add description, help
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.
Can this be done as an all day event?
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.. th-cam.com/video/FDkKIFyaYC4/w-d-xo.html
Thanks for the inspiration👌
And here’s an apps script tutorial making a tic tac toe game:
th-cam.com/video/LYN3Cvlsflg/w-d-xo.html