Great videoes, Spencer. Thank you for putting in the effort. Keep up the good work! Love the email videos.
@SpencerFarris3 жыл бұрын
Thank you!
@yomammaonastick Жыл бұрын
This is awesome man thank you I’ve been working tirelessly for days looking for a demo that does that step in a project I’m working (with zero and I really mean zero computer science experience). Do you have any advice on what I would do to prevent duplicated events when the scrip is ran again and then finally how to update existing events when the sheet changes? I imagine they both tie together with sort of identifier like an event ID. There are probably fancier ways to do it but I would just end up using the time stamp google sheets uses when a form is submitted as the ID. I just don’t have a clue how to continue from here.
@SpencerFarris Жыл бұрын
There is a unique ID for each calendar event, so you could write that ID (CalendarEvent.getId()) back to the sheet, only create events that don't have an event ID, and update the event with that ID.
@joaohmore3 ай бұрын
What a great video! I was wondering if a can create recurring events to be displayed in Google Sheets. I created a interactive calendar on google sheets but couldnt find a way to create recurring events to link to this calendar besides listing all the events or input manually this info
@SpencerFarris3 ай бұрын
In scripting it's called an Event Series developers.google.com/apps-script/reference/calendar/calendar-app#createEventSeries(String,Date,Date,EventRecurrence)
@TrenerZvezdnaia3 жыл бұрын
Super!!!
@Camdizzzzle2 жыл бұрын
This works great for pushing data to a calendar, but if I edit the data, how do I update the calendar without creating duplicate events?
@brcleaning30922 жыл бұрын
same question,,, have you been able to figure this one out?
@sujikim55792 жыл бұрын
@@brcleaning3092 me too T,T have you been able to figure this one out?
@saadlahkim10 ай бұрын
Thank you, Spencer for the Video great work, I would like to know if it is possible to have more sheets my issue is we have holidays in different countries and each sheet has the holidays for the calendar and we want to add these holidays to a calendar that can be shared by everyone in the company
@SpencerFarris2 ай бұрын
Sure. Is this still an issue?
@SaniiBaliRain2 күн бұрын
Idk why, but I cannot Run the command :(
@JonathonNeville2 жыл бұрын
Can this work with recurring events, so Google Calendar recognizes it as a recurring event / repeating event (not just a list of individual events that happen to repeat)?
@SpencerFarris2 жыл бұрын
Just use .createEventSeries() developers.google.com/apps-script/reference/calendar/calendar-app#createEventSeries(String,Date,Date,EventRecurrence)
@venkateshsharma24072 жыл бұрын
What if I change the date, will it update the event automatically to the changed date?
@SpencerFarris2 жыл бұрын
No
@DavidMarcadet3 жыл бұрын
Thanks
@sergebrosseau9912 жыл бұрын
Just a log of my process to get this working on Oct 5th 2022 for the next ppl who come along and potentially have these issues. Getting this error with your current code and sheet listed in the comments of the video : TypeError: d1.setTime(...).setHours is not a function createCalendarEvents @ Code.gs:14 My personal calendar works but then if I try to change it to a named calendar or by Id, it doesn't seem to "find" the calendar I want to use ? (fixed) EDIT1: I'm in an organisation and the calendar I was trying to use was a calendar that had been assigned to me by the org administrator, so I created my own calendar and it works now. ****** EDIT2: Time the event is created is not correct. No matter what I do it will not schedule the event at the correct time specified in my sheet. The time is set to create the event for 8:00 AM, but it makes it for 10:00 AM. ****** Edit3: When using dates/time with a Spreadsheet, the script will use the Sheet's timezone settings. Having made a copy of your sheet it kept your timezone which was set to -7 Mountain Time. Changing the timezone setting in Appscript did nothing (was first thing I tried).
@SpencerFarris2 жыл бұрын
Wow, lots of testing! I'm impressed. Are you currently having it working, or not working?
@MonsciousEnglish2 жыл бұрын
Oct24 2022, and I am also having this problem (TypeError: d1.setTime(...).setHours is not a function). I can't seem to get logger to work for reading any of my sheet data dates either. Sorry I haven't got the error code for that here. I eventually downloaded the spread sheet link, copied and had the error mentioned above. I did notice that in the video you said the time was correct (in 24 hour format) But it actually wasn't. You had 3pm in your spreadsheet, and the data logger had the time as 17:00 (5pm), (1899) which is out by 2 hours (and how ever many hundred years). I was expecting to see 15:00 (3pm) as the correct time. I also found that when looking for calendars, it would only find calendars that were on the same account that I was signed into sheets with.
@SpencerFarris2 жыл бұрын
@@MonsciousEnglish Yes, you can only quickly see the calendars of the account. You can get other calendars by ID It's probable that your values are not formatted in a way that Sheets or the script recognize. The dates were correct for me. The offset comes off weird because of the difference between the sheet TZ, account TZ, and script TZ.
@Kairosart Жыл бұрын
@@MonsciousEnglishSame here with sethours error.
@jenniferpyle8797 Жыл бұрын
As far as the setTime error, I was able to make it work by removing .setTime() if you see the code in the video it isn’t there. Hope that helps