Apps Script - Create Calendar Event From a Form

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ม.ค. 2025

ความคิดเห็น • 33

  • @EamonnCottrell
    @EamonnCottrell  11 หลายเดือนก่อน +1

    Here’s another apps script video with sheets and calendar:
    th-cam.com/video/FDkKIFyaYC4/w-d-xo.html

    • @DdgeluvinHic
      @DdgeluvinHic 8 หลายเดือนก่อน +2

      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?

    • @EamonnCottrell
      @EamonnCottrell  8 หลายเดือนก่อน +2

      @@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)

    • @DdgeluvinHic
      @DdgeluvinHic 8 หลายเดือนก่อน +1

      @@EamonnCottrell thanks man! I’m gonna give that shot. I’ll let you know how it goes.

  • @fherantawatisudargo2273
    @fherantawatisudargo2273 3 หลายเดือนก่อน +1

    hi, how to fix it for double booked reservation when form submitted.. or make it blocked the reservation that already booked ?

    • @EamonnCottrell
      @EamonnCottrell  3 หลายเดือนก่อน

      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.

  • @MataSurya-o6c
    @MataSurya-o6c 4 หลายเดือนก่อน +1

    hello brother, let me introduce myself from Indonesia, can you get coding like this video but for bidrtday?

  • @trinosmattgabrielc.4396
    @trinosmattgabrielc.4396 7 หลายเดือนก่อน +2

    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?

    • @EamonnCottrell
      @EamonnCottrell  7 หลายเดือนก่อน

      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.

  • @ayenewwalle1
    @ayenewwalle1 หลายเดือนก่อน +1

    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?

    • @EamonnCottrell
      @EamonnCottrell  หลายเดือนก่อน

      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.

    • @ayenewwalle1
      @ayenewwalle1 หลายเดือนก่อน

      @@EamonnCottrell Thank you

  • @jungan4500
    @jungan4500 5 หลายเดือนก่อน +1

    繁體中文網頁無法使用
    一直顯示 程式碼:5錯誤
    好可惜, 感謝提供!

    • @EamonnCottrell
      @EamonnCottrell  5 หลายเดือนก่อน

      If you share your sheet, perhaps I can figure out what's going on.

  • @khalidyoga7517
    @khalidyoga7517 5 หลายเดือนก่อน +1

    how to have form event and spreadsheet event in the same file?

    • @EamonnCottrell
      @EamonnCottrell  5 หลายเดือนก่อน

      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.

  • @MargitIF
    @MargitIF 7 หลายเดือนก่อน +1

    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?

    • @MargitIF
      @MargitIF 7 หลายเดือนก่อน +1

      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...

    • @EamonnCottrell
      @EamonnCottrell  7 หลายเดือนก่อน

      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

  • @karolkwiatkowski4074
    @karolkwiatkowski4074 10 หลายเดือนก่อน +2

    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.

    • @EamonnCottrell
      @EamonnCottrell  10 หลายเดือนก่อน +1

      Awesome! Glad you’ve got it working 👍

  • @PassionBrains
    @PassionBrains 7 หลายเดือนก่อน +1

    But if events overlapping?

    • @EamonnCottrell
      @EamonnCottrell  6 หลายเดือนก่อน

      It will create overlapping events just like you can do manually on the google calendar.

  • @fdect
    @fdect 9 หลายเดือนก่อน +1

    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!

    • @EamonnCottrell
      @EamonnCottrell  9 หลายเดือนก่อน

      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

    • @akshaypalkar
      @akshaypalkar 3 วันที่ผ่านมา

      @@EamonnCottrell i wantched second vedio and tried but not unable to add description, help

  • @fabiogerbino7773
    @fabiogerbino7773 11 หลายเดือนก่อน +1

    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

    • @EamonnCottrell
      @EamonnCottrell  11 หลายเดือนก่อน

      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.

  • @BobBoogger
    @BobBoogger 9 หลายเดือนก่อน +1

    Can this be done as an all day event?

    • @EamonnCottrell
      @EamonnCottrell  9 หลายเดือนก่อน

      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

  • @AkoMSentani
    @AkoMSentani 7 หลายเดือนก่อน +2

    Thanks for the inspiration👌

  • @EamonnCottrell
    @EamonnCottrell  11 หลายเดือนก่อน

    And here’s an apps script tutorial making a tic tac toe game:
    th-cam.com/video/LYN3Cvlsflg/w-d-xo.html