How to automatically add a schedule from Google Sheets into Calendar

  Рет қаралды 318,461

Google Workspace

Google Workspace

Күн бұрын

Пікірлер: 354
@dhawalsharma8889
@dhawalsharma8889 Жыл бұрын
Just loved the part where she made it easy for every one to share... And shared the spreadsheet and script with us
@CHADWHITE-dj7dn
@CHADWHITE-dj7dn 11 ай бұрын
dude I have 8 miinutes please tell me if youre being serious and if so please tell me where i can find the spreadsheet
@ARCopros
@ARCopros 3 жыл бұрын
Why didn't you put the script and the google sheet in the description to download ?
@IsaacTannerDempsey
@IsaacTannerDempsey 2 жыл бұрын
Drive traffic to the website
@dhawalsharma8889
@dhawalsharma8889 Жыл бұрын
They want you to work
@mago358
@mago358 4 жыл бұрын
It would be more simple if you guys have an add on to synch the forms with the calendar, instead of code for every event.
@diamondzieman5508
@diamondzieman5508 3 жыл бұрын
I feel like im watching a tv show. I am a music teacher and I have a full schedule from 8-6pm most days so this really helped lessen the work
@HuntedRedStoNe73
@HuntedRedStoNe73 4 жыл бұрын
Amazing tutorial tyvm! :) But i am wondering if i suddenly decide to delete the schedule or update it, will it also be updated in the calendar or will it just create another calendar?
@LloydCledwyn
@LloydCledwyn Жыл бұрын
Any Luck on this?
@Khoahocduthu
@Khoahocduthu 7 ай бұрын
It duplicates the old event and create new event.
@adriennemccue
@adriennemccue 5 жыл бұрын
Mind-blown! Totally doing this for our nonprofit volunteers! Thanks so much!
@hermanwolf4024
@hermanwolf4024 3 жыл бұрын
I see a lot more code in the video than I do in the 'Step-by-step guide'. Where can I get a copy of the code to inspect and modify? Where is this 'skeleton code'?
@usernmae77
@usernmae77 5 жыл бұрын
Is there a link to the coding that she whizzes through? I feel so out of the loop with coding these days I'm a bit shy to ask! I've read the blog post that breaks down the directive for the APP SCRIPT and it's super helpful.
@gedalyahreback2133
@gedalyahreback2133 4 жыл бұрын
So this is great. Unfortunately, when I run the script, it doesn’t actually populate the calendar with events. I’m not sure what I’m missing.
@chrisbetcher4209
@chrisbetcher4209 7 ай бұрын
This is cool, but where do I get the skeleton code from? That seems like the missing bit.
@cheechdac
@cheechdac 5 жыл бұрын
I see all these questions but none have been answered. =(
@LoveStarsWorld
@LoveStarsWorld 4 жыл бұрын
It's good to know that even Google drops the ball :)
@JoannaGSmith
@JoannaGSmith 4 жыл бұрын
Oops! I don't always remember to scroll through my KZbin comments.
@ccp_it
@ccp_it 2 жыл бұрын
How do you manage this if you don't want each run to create a duplicate event? If I run this 2 times, it creates the same event twice. The video was excellent, thank you
@derekknizner
@derekknizner 4 жыл бұрын
How about the "skeleton" code....that would be nice so we can just copy and paste.
@morriec9868
@morriec9868 4 жыл бұрын
Looks to be available (at the time of writing at least) when clicking on "Show more" in the blurb mentioning G Suite Pro above.
@jimdoria3283
@jimdoria3283 4 жыл бұрын
@@morriec9868 Clicking Show More dhows me a few links, including one to the blog post, but no code. Also, the blog post doesn't appear to have all the code in it - just a few scattered lines. Are you saying the code itself appears in Show More for you?
@morriec9868
@morriec9868 4 жыл бұрын
@@jimdoria3283 Sorry, no, just that code is in the blog post in the show more section, in parts, not all together.
@Rain_theGamer
@Rain_theGamer 4 жыл бұрын
@@morriec9868 that's because you are supported to *learn* the coding process
@morriec9868
@morriec9868 4 жыл бұрын
@@Rain_theGamer You're replying to the wrong person. I was just answering other persons in this sub thread requests for the code that was shown in the video, but not provided in c&p form. I don't disagree with their reason for asking it however (that you shouldn't expect everyone to learn the language just to do the task (or similar enough) to what is in the how to above). If people want to learn (as I would if I had the need to code in Gcode) there is documentation to do so.
@yikuanho6609
@yikuanho6609 5 жыл бұрын
This format of video makes it so easy to understand. Thank you so much!
@ericswoyer4148
@ericswoyer4148 Жыл бұрын
Thanks for putting this together. What if I wanted the process to flow in the opposite direction? For example, when an event is added to a GCalendar, details from that event are added to a new row in a GSheet?
@thiagoagape4910
@thiagoagape4910 6 ай бұрын
That's exactly what I need to do. Did you manage to do it?
@jessicamyers5429
@jessicamyers5429 4 жыл бұрын
This is great! Now what if I have a description that I want to include (for example, if I have volunteers and they're all going to different locations or something)? How would I add that bit as well?
@fepton
@fepton 3 жыл бұрын
Hi Jessica, here is what you are missing: eventCal.createEvent(dataArray[i][0],dataArray[i][1],dataArray[i][2],{ description: dataArray[i][4] + ' ' + dataArray[i][5] + ' '}).setColor(CalendarApp.EventColor.YELLOW); The first value is the name, the second is start time, third is end time and THEN----> {description: "describe your event or use a variable to pull from the sheet"+ return + "this is the HTML link to the event"} make the calendar event yellow. - does make sense?
@michaelmagana8665
@michaelmagana8665 4 жыл бұрын
It doesn't work :( TypeError: Cannot read property 'createEvent' of null (line 29, file "Code")
@jmannumbers12
@jmannumbers12 3 жыл бұрын
I got it to work. DM me if you need help. My problem was that whenever I added or deleted a row or column it broke my script. The solution is to go back to the script and make sure each cell that you are referencing is the cell you intend to reference. For example, A2 might need to be switched to B2 in your script if you added a column.
@hanaanrosenthal
@hanaanrosenthal 4 жыл бұрын
OMG sweetest how-to tech video I have ever watched!
@markmc1989
@markmc1989 5 жыл бұрын
Is there a way I can reverse this process, i.e. populate a sheet with particular kinds of events in calendar?
@cregenda
@cregenda 5 жыл бұрын
I second this
@rezjiwa3702
@rezjiwa3702 5 жыл бұрын
has anyone found the reverse....Calendar to sheets??
@CamiloNovoaT
@CamiloNovoaT 4 жыл бұрын
​@@rezjiwa3702 Sure, check the CalendarApp documentation, you can get all event on a range of time and other stuff related developers.google.com/apps-script/reference/calendar/calendar.html
@StiffBarsBentMinds
@StiffBarsBentMinds 4 жыл бұрын
@@CamiloNovoaT is there a way to export gcal into gsheets as a log counted entry? e.g. if i visit the gym 3 times a week and want to track ?
@StiffBarsBentMinds
@StiffBarsBentMinds 4 жыл бұрын
@@CamiloNovoaT is there a way to export gcal into gsheets as a log counted entry? e.g. if i visit the gym 3 times a week and want to track
@matthall6485
@matthall6485 Жыл бұрын
Hi Joanna! This is AMAZING info, but I'm in way over my head. I have ZERO coding experience, so trying to make your shift calendar work for my needs is... well, I don't know what the hell I'm doing! Please help?!? Goal: I want to use a spreadsheet to set reminders in my calendar based off of the dates customers purchase specific products. I'd like to reminder to read "Customer, Item, Quantity, Expiration Date". Any guidance?
@andreasb4512
@andreasb4512 4 жыл бұрын
I would love to see a option to add the calendar to a google doc, maybe you can do a tutorial for that
@rbfreitas
@rbfreitas 3 жыл бұрын
Looking forward to try it out!!! Loved the format! Engaging and easy to follow.
@aw6238
@aw6238 2 жыл бұрын
does it work for you? Could you send me your code? :)
@kurtreject
@kurtreject 4 жыл бұрын
Hi Joanna! Thank you so much for this. Could you please help me arranging the code to just make an all day event from a date in my google spread sheet?
@shanemonteiro
@shanemonteiro 3 жыл бұрын
@@jamielaing479 did you really just make an account to say this bad joke
@fabiobellan1947
@fabiobellan1947 4 жыл бұрын
For those ones are complaining about duplicates when the script is run twice or more times, you can easily add a control in the script it self. In my case I am creating events for the whole day, so not using specific hours. By the way, I have embedded into the Task #3: var daysevent = eventcal.getEventsForDay(starttime); if (daysevent.length == 0) { eventcal.createAllDayEvent("Event Name", starttime) } Which means: if the event already exists, skip it :), if it does not exists, create it. Bye
@victorbenitez6789
@victorbenitez6789 4 жыл бұрын
You can help? I have the events by specific day and time but I cannot find the code to solve this problem that duplicates the events when it is executed more than once.
@fabiobellan1947
@fabiobellan1947 4 жыл бұрын
@@victorbenitez6789 You can check if there is already an event that starts/ends that time by the following code: //here we check if there are events already scheduled during that range of time var daysevent = eventcal.getEvents(starttime, endtime) if (daysevent.length == 0) { //if there are not it creates the event eventcal.createEvent(title, starttime, endtime) } Hope it helps...
@loriegrant1123
@loriegrant1123 4 жыл бұрын
Can you share what your spreadsheet set up looks like to call the all day event with no time?
@siddharthmadhukar
@siddharthmadhukar 4 жыл бұрын
Hey Amun, what if I have 2 events scheduled for the same time/day. It picks only the first one and second one is NOT shown on my calendar
@fabiobellan1947
@fabiobellan1947 4 жыл бұрын
​@@siddharthmadhukar Obviously two events should have different titles right? So I assume that you can use the method getTitle(), so if the event with that specific name exists already, you should ask Google to just create the second one, otherwise create both, or many. You can find how to use the getTitle directly from this list: developers.google.com/apps-script/reference/calendar/calendar-event#getTitle() Looking for an example, I found this one: stackoverflow.com/questions/27379960/get-events-titles-and-show-it-on-spreadsheet
@akshaysakure8265
@akshaysakure8265 5 жыл бұрын
Hi Joanna and G-Suite team, Actually I wanted to use this feature to sync a Project plan in Google sheets to Calendar where I have multiple columns So,Can I add more than 3 columns (as shown in video) ? If yes, can I name them differently than the headers you have given?
@nmhinton
@nmhinton Жыл бұрын
Hi, thanks for the video! I'd like to have the (sheets and g-calendar) automated so anytime something is updated on the sheets, it's also updated on the calendar and vice versa. I see it can be customized but is there a way to do it automatically? I'm also curious if I have the locations set with a specified time in different timezones, how can I make that show up on my sheets/caldendar?
@vincentmarino6655
@vincentmarino6655 5 жыл бұрын
Trying to modify this script so it can be used for lesson planning. Want to be able to type a module #, unit #, start date, end date, lesson description, lesson target into 6 columns on my spreadsheet then run the script to have it show up on my google calendar. Can someone contact me to help me with this or who could I contact for more direct help? Thanks!
@9206201
@9206201 Жыл бұрын
Great guide! I'm wondering how I can add reminders to my events from Google Sheets, please
@neudiem1165
@neudiem1165 4 жыл бұрын
I followed the video, triple checked functions & variables, and ran the script without the Script Editor returning any errors, but my Google Sheet and script seem fundamentally disconnected. The new menu option in the Google Sheet has not appeared and no events have been created in the relevant calendar. Is there an obvious basic step I'm missing outside the scope of this video?
@justinaquino6000
@justinaquino6000 5 жыл бұрын
i like this kinds of tutorials
@JoannaGSmith
@JoannaGSmith 5 жыл бұрын
Thanks! :) Me, too.
@rconley505
@rconley505 5 жыл бұрын
What a great video. Is there any way to add reminders into the events?
@RobAubrey
@RobAubrey 3 жыл бұрын
Me personally, I would create a specific calendar, then I would set the reminder defaults that I wanted for that specific calendar.
@spbtrader
@spbtrader 5 жыл бұрын
honestly it is all for geek, but i belive one day GCcalendar and GSheets come toghether and work as one
@vasukinagabhushan
@vasukinagabhushan 4 жыл бұрын
Google is horribly slow in listening to customers' requests.
@AlexDKennedy
@AlexDKennedy 2 жыл бұрын
This is really interesting! I'll try to use it!
@cheswatchdogs3534
@cheswatchdogs3534 5 жыл бұрын
To coordinate volunteers I have them sign up for slots via Google Forms, The form writes to a sheet that runs THIS Code to populate a calendar with the volunteer dates. I have a Trigger set on "Form Submit" so the calendar updates every time someone completes a form. However, It seems like this gives up after a while and stops updating after a couple weeks. When I go in to debug, I run it to test before I make any changes and it starts right back up no issue. Is there some timeout or other issue with the triggers?
@mariecolepangilinan1231
@mariecolepangilinan1231 6 ай бұрын
Hello, do you remember how you made the trigger you set on "Form Submit" so the calendar updates every time someone completes a form?
@nileshdeshmukh7386
@nileshdeshmukh7386 4 жыл бұрын
Can we add information to another person's calendar (to whom we have shared file)?
@NariMohan
@NariMohan 5 жыл бұрын
thank you very much for the info... Two (2) questions: 1. With this script that you've modeled in the video, is it triggered by a specific event or do you have to manually run it every time you need it? 2. Does this script take into consideration to automatically update a shift detail if you make any changes?
@JoannaGSmith
@JoannaGSmith 5 жыл бұрын
1. This is manually triggered by clicking the custom menu. Setting up a trigger would be just as simple--for example, to run everytime the Sheet is edited. (developers.google.com/apps-script/guides/triggers/) 2. Nope, this script does not automatically update, but setting up an onEdit() trigger would do so! Note that you'd want to add support for tracking the event ID in order to make changes. Should I write up an example of this?
@IsabellaScorza
@IsabellaScorza 5 жыл бұрын
@@JoannaGSmith yes please
@NariMohan
@NariMohan 4 жыл бұрын
@@JoannaGSmith Yes please
@andreabilic8144
@andreabilic8144 2 жыл бұрын
@@JoannaGSmith Yes please
@sbfotome
@sbfotome 3 жыл бұрын
Where can we find the complete script at?
@thekhaospodcast
@thekhaospodcast Жыл бұрын
Super helpful! Thank you
@eMavern_Emporium
@eMavern_Emporium 9 ай бұрын
What an honest to goodness baddie!
@BobYau
@BobYau 10 ай бұрын
great tutorial!
@MichaelDaniels
@MichaelDaniels 4 жыл бұрын
This is exactly what I want I think. Where is the code/script??? Can I just add 3 columns? Like Title column , Date column Time column, Then Description column.
@fepton
@fepton 3 жыл бұрын
Hi Michael, here is what you are missing: eventCal.createEvent(dataArray[i][0],dataArray[i][1],dataArray[i][2],{ description: dataArray[i][4] + ' ' + dataArray[i][5] + ' '}).setColor(CalendarApp.EventColor.YELLOW); The first value is the name, the second is start time, third is end time and THEN----> {description: "describe your event or use a variable to pull from the sheet"+ return + "this is the HTML link to the event"} make the calendar event yellow. - does make sense?
@KhushbooSingh-mw8wg
@KhushbooSingh-mw8wg 3 жыл бұрын
This was very helpful. Thank you.
@aw6238
@aw6238 2 жыл бұрын
does it work for you? Could you send me your code? :)
@michaelkoerts3168
@michaelkoerts3168 4 жыл бұрын
it works fine but every time i use the script it puts a new entry in the calender it does not sync. Is there a code that see duplicate entrys ?
@nicholaslealand
@nicholaslealand 3 жыл бұрын
this is super relevant. If the code could either remove old ones or change them it would be much more useful
@td7636
@td7636 3 жыл бұрын
Hi! I am getting this error - TypeError: Cannot read property 'createEvent' of null
@jitundc
@jitundc 3 жыл бұрын
Excellent. i was looking for it.
@arkanthiel
@arkanthiel 3 жыл бұрын
I wasted around four hours of work trying to get this to run. Eventually I realized that when calling the array on the loop it doesn't actually call EACH ITEM, but rather EACH ROW. I've yet to find out how to do this. The code displayed in this video doesn't actually work.
@JasperMouws
@JasperMouws Жыл бұрын
Awesome! Is it also possible to delete calendar events via this script?
@kinect2dance887
@kinect2dance887 4 жыл бұрын
Is it possible to do the same process in reverse? I want to extract a calendar event/roster but don't want to export the entire calendar. Then use this data in sheets to import it into a doc or PDF
@gustavotriani5611
@gustavotriani5611 5 жыл бұрын
In my code, there's an error that says "Can't find method createEvent(object, string, object)"
@JoannaGSmith
@JoannaGSmith 4 жыл бұрын
This probably means that your variables are in the wrong order. Make sure that it's createEvent( Name-of-event, Date-object, Date-object )
@KhaliShiAU
@KhaliShiAU 5 жыл бұрын
Can we please get a copy of the whole script?
@JoannaGSmith
@JoannaGSmith 5 жыл бұрын
Yeah, good point. I'll move it into GitHub for easy sharing.
@adriennemccue
@adriennemccue 5 жыл бұрын
@@JoannaGSmith can we get the link? Google use to add code in a shared doc or sheet.
@KhaliShiAU
@KhaliShiAU 5 жыл бұрын
Joanna Smith , any update on this?
@janmeza4540
@janmeza4540 5 жыл бұрын
Any updates on that? I just checked your GitHub but i can't find anything there.
@blenderstuff2239
@blenderstuff2239 5 жыл бұрын
@@JoannaGSmith please! It would help a lot to follow along the video!
@otorrescastillo
@otorrescastillo 5 жыл бұрын
Hi Joanna and G-Suite team great tutorial. I can create my events on Calendar, but i Have a problem every time I sync the Sheet with Calendar, using the UI option in the menu, the event in calendar Duplicates.. do yoy have another function that resolves this,?? maybe first delete the content of the calendar and then insert the events like if there were new. ???
@sbfotome
@sbfotome 3 жыл бұрын
Can we pull a cell data as an email address and then add it to the invite block of an event?
@thesire7553
@thesire7553 2 жыл бұрын
Hi Joanna, thank you so much for this video! I was playing around aiming to customize this, and I was wondering if there's any articles/additional informations regarding how to create multiple event types, or more specifically how to split the cell ranges up? For example, I was trying to customize this into a start and end dates instead of times, and instead I populated the event successfully, but they spanned from the start date all the way until the end date. I appreciate any guidance you can provide. Cheers!
@cgabby98
@cgabby98 2 жыл бұрын
I tried to reply to this earlier, but think it was deleted because of links. Going to try again (4th try...i think comments hates me :) ***** I was playing with customizing what I saw here as well and found what I think you are looking for. This page [Calendar Service | Apps Script | Google Developers] may have the info you need. I found 'createAllDayEvent' options especially helpful, thouugh you may be looking for one of the other listings If I misunderstood and you are saying you need to break the date and time into different fields then combine on processing, then you may also need this page [Working with Dates and Times | Google Ads Scripts]. It helped me combine date/times extracted from other info into a useable date for a secondary entry. I am a newbie too, but hope this helps.
@RodolfoGugmusic
@RodolfoGugmusic 4 жыл бұрын
Great video! How do we do it the other way around, reading data from calendar and putting it on the sheet
@hectorcastillo2416
@hectorcastillo2416 4 жыл бұрын
I also need to know how to do this! If you find something please let me know!!
@juannepomuseno7799
@juannepomuseno7799 3 жыл бұрын
Hello, How can i hide dates and hours that are already reserved? Great tutorial video.
@MichaelDaniels
@MichaelDaniels 4 жыл бұрын
Also, I have a Sheet one where I have a master schedule where I pull data. is there a way for me to NOT duplicate a calendar event?? I want to run the script but it duplicates as things get added from sheet one. Thank you
@karl429
@karl429 5 жыл бұрын
thank you very much - this is a nice one... but how can you sync back and forth? I mean: ...changing or deleting something in the sheet applies to the calendar... changing or deleting something in the calendar applies that to the sheet... you get the idea? ...that would be awesome: a fully integration of a calendar in a google spreadsheet - do you have a solution for that?
@MegaCynar
@MegaCynar 5 жыл бұрын
That's a great question. I'd love to hear if there's a way to do that
@DimuDesigns
@DimuDesigns 5 жыл бұрын
You can try messing with push notifications in the Calendar API. But you may have to go beyond using Apps Script to pull off a fully integrated two-way sync.
@JoannaGSmith
@JoannaGSmith 5 жыл бұрын
Yeah! This is definitely possible. It's a natural extension, but is a bit too in-depth for the pro-tip format above. It seems like there's some interest, so I'll play with getting a sample drafted this week, and comment here again when I do!
@marcuskruse1
@marcuskruse1 5 жыл бұрын
@@JoannaGSmith any luck?
@karl429
@karl429 5 жыл бұрын
@@marcuskruse1 apparently not..
@petermaster5
@petermaster5 3 жыл бұрын
Hi, thank you for your code, works perfectly. I would like to add color to an event, based on cell value. I have 5 different options of cell values in my events, what should I do to add the color? I tried this but it doesn't work: " eventCal.createEvent(proyectos,comienzo,termino) .setDescription(instalador) .setColor(if (especialidad == "HDPE") {"#2952A3"}" where the color is set based on the value in the cell "especialidad" Error: SyntaxError: Unexpected token 'if', línea: 32, archivo: Código.gs Please help
@alexdial2829
@alexdial2829 3 жыл бұрын
Hi! I'm in a similiar situation, were you able to figure this out?
@dormoshe1664
@dormoshe1664 4 жыл бұрын
i got this error The parameters (String,String,(class)) don't match the method signature for CalendarApp.Calendar.createEvent. (line 13, file "code") this is my code function myFunction() { var spreadsheet = SpreadsheetApp.getActiveSheet(); var calendarId = spreadsheet.getRange("U1").getValue(); var eventCal = CalendarApp.getCalendarById(calendarId); var signups = spreadsheet.getRange("A2:C500").getValues(); for (x=0; x
@pianogirl08
@pianogirl08 4 жыл бұрын
@DOR MOSHE - Hi , was wondering if you solved this issue? I am running into the same error message for the following line and wanted some insight on how to solve it. eventCal.createEvent(name, startTime, endTime)
@stephanejaimeorts9642
@stephanejaimeorts9642 Жыл бұрын
Hi there, thanks for this tuto, great one! So, I actually followed the step quite thoroughly but was not able to get to the end goal I had for my idea. Is there a way I could share you my spreadsheet so you can have a look and let me know what I missed/did incorrectly please? The doc is a retroplanning made through google sheet and I'd like to extract key events (all day events) to have them in my calendar. Thank you in advance for you support!!
@guycohen4403
@guycohen4403 2 жыл бұрын
This is great, but 1 thing is , where i can find the documentation about each function and class, and each option that I can do.(like in other libraries)
@ttfrhoncho6716
@ttfrhoncho6716 3 жыл бұрын
? Has this been deprecated ? Getting This: TypeError: Cannot read property 'createEvent' of null (line 16, file "Code") Can this how-to be removed if it no longer works. I'm not going to get that 2 hours back.
@angelenepelayo745
@angelenepelayo745 3 жыл бұрын
i received the same error. have you figured it out yet?
@roylevy86
@roylevy86 Жыл бұрын
Hi Joanna, thank you so much for this video! I was wondering if its possible to send event on google calender to each person that his name is on the cell of the even.For example, If for example on Monday Jason is working from 8-5 at a certain location , would it be possible that once I'm typing his name it will automatically send to his google calendar invitation to event ?. I appreciate any guidance you can provide. Thank you so much . Happy new year
@3Fatboy33
@3Fatboy33 3 жыл бұрын
Thanks a lot. This was helpful to me :)
@Erika-oo7oi
@Erika-oo7oi 4 жыл бұрын
Thank you for this! Thinking through our scenario - we have a few dozen people assigning themselves to shifts on the google sheet, who would really only be interested in adding their own shifts on their own google calendars. Any suggestions for this?
@joanneallaire
@joanneallaire 2 жыл бұрын
Awesome stuff. I would like to export my google calendar into google sheets, as I have to time keep how many hours I've put in either per week/month/year. Could you provide?
@PrinceMarthX
@PrinceMarthX 3 жыл бұрын
I don't get why you don't provide the code. You've written it. Why not share it? Making people manually replicate what you did is silly.
@MrBetamike
@MrBetamike 5 жыл бұрын
So if my school follows a 7 day cycle instead of a weekly cycle, I should be able to use this as a base and make it easier to add info to my calendars? I hope so at least. This is a great place to start! Thanks!
@ShanmukaRajan
@ShanmukaRajan 5 жыл бұрын
better you put this as an option in UI of Calendar or Google Sheets for ease of use. It will avoid coding in Google app scripts :D
@JoannaGSmith
@JoannaGSmith 5 жыл бұрын
Ha! If only I had control over product UI! :P But, this is just a tip. Think of the sort of services you could build that would benefit from Apps Script integrations.
@CONMENSAJE
@CONMENSAJE 5 жыл бұрын
This is great. Thanks a lot. But I'd like to take it a step further. Is there a way to sync the events created this way? If the events in the spreadsheet change I'd like to update them in Google Calendar accordingly. Also, it'd be good to adapt the script to make sure that the events already in the calendar are not re-added to it. (I'm thinking of synchronising a marketing plan that lives into a spreadsheet with a calendar). Any hints on how to do it?
@ThePlantricianProject
@ThePlantricianProject 4 жыл бұрын
Did you ever figure out how to do this? I'm trying to do the same thing with my marketing calendar. I get duplicate events every time I run the script. Its driving me crazy!
@JoannaGSmith
@JoannaGSmith 4 жыл бұрын
So, the most important thing to update an existing event is to track the event ID. I recommend (1) adding a column to your spreadsheet for the ID. (You can "hide" it from the UI so others don't see it/delete it by accident.) Then, (2) when you call createEvent(), store the event that comes back. i.e.: var event = eventCal.createEvent(). And then (3) you can use event.getId() to find the id of the specific calendar event. (4) Write that ID to your spreadsheet. (5) Before creating a new event, you'll want to see if an event ID already exists in your spreadsheet. If not, create the new event and save the ID. If it does, retrieve the existing event, and update individual values as needed. developers.google.com/apps-script/reference/calendar/calendar-event#methods
@xkaliba
@xkaliba 3 жыл бұрын
@@JoannaGSmith Thanks so much for your advice Joanna. I took what you said and came up with this: function scheduleDeliveries() { /** Open the Delivery Calendar **/ var spreadsheet = SpreadsheetApp.getActiveSheet(); var calendarId = spreadsheet.getRange("B1").getValue(); var eventCal = CalendarApp.getCalendarById(calendarId); /** Pull in each delivery date/time and existing Event ID **/ var deliveries = spreadsheet.getRange("B3:D25").getValues(); var eventIds = spreadsheet.getRange("Q3:Q25").getValues(); /** Do the work **/ for (x = 0, y = 0, z = 3; x < deliveries.length; x++, y++, z++) { var delivery = deliveries[x]; var oldEvent = eventIds[y]; var eventId = 'Q' + z; var startTime = delivery[0]; var endTime = delivery[0]; var customer = delivery[1]; var location = delivery[2]; var existEvent = eventCal.getEventById(oldEvent) if ((!startTime) || (!endTime)) break; if (!existEvent) { // Creates new events from new entries and writes new event to sheet var event = eventCal.createEvent(customer, startTime, endTime,{location: location}).getId(); var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; var cell = sheet.getRange(eventId); cell.setValue(event); } else { // Updates existing events if changes are found var existEventStartTime = existEvent.getStartTime(); var existEventEndTime = existEvent.getEndTime(); var existEventTitle = existEvent.getTitle(); var existEventLocation = existEvent.getLocation(); if (existEventTitle != customer) { existEvent.setTitle(customer) } if (existEventLocation != location) { existEvent.setLocation(location) } if ((existEventStartTime != startTime) || (existEventEndTime != endTime)) { existEvent.setTime(startTime, endTime) } } } } This seems to work for me and events aren't getting duplicated anymore if there is already an eventId attached to it from the spreadsheet. If there is not one, it makes an event for it and populates the column. I also realized that I don't need a different startTime and endTime, so I modified the code to use the same value for both. It would have taken me a lot longer to figure out if I didn't have your hints. Thanks so much!
@batero06
@batero06 3 жыл бұрын
@@xkaliba Hi!, Thank you for posting your code! it inspired me how to modify mine. But did you solve the issue with new entries that are outside the range set to obtain values? (i.e: var deliveries = spreadsheet.getRange("B3:D25").getValues()). I've been having the issue that if i put data in B26, the code does not process correctly, but if I modify the range in the script, it works perfectly, but user should not have to modify the script in order to function.
@pauljones2796
@pauljones2796 2 жыл бұрын
@@batero06 I think I saw one solution to this - if (customer == ''){continue;} this should skip the entry if there is no value for 'customer' in this row
@sushanthkodela9562
@sushanthkodela9562 5 жыл бұрын
Every time I run the script, the calendar events are getting duplicated!
@drudgls
@drudgls 4 жыл бұрын
debugging runs the code and adds the calendar events. if you just run the code without debugging it should resolve the duplicate issue
@JoannaGSmith
@JoannaGSmith 4 жыл бұрын
lol, yes. Every time you call "createEvent" it will create a new event. Testing this app left me with ~20 events on my calendar that I had to delete. If you want to continuously update and edit the same calendar event, be sure to store the ID of that event, so that you can look it up and modify it later.
@jaredthescienceguy
@jaredthescienceguy 4 жыл бұрын
@@JoannaGSmith What do you mean by "storing the ID" of the event? I would also like the script to only create new events (on a list that is constantly being added to) without duplicating the old ones
@lindccds
@lindccds 4 жыл бұрын
@@JoannaGSmith Hi Joanna, awesome tutorial! Could you add the details on storing the event ID? I'd like to maintain a spreadsheet and edit/add regularly and be able to sync. Seems like we'd need to include a function to add the event ID to the matrix?
@mireillebseirani164
@mireillebseirani164 4 жыл бұрын
@@JoannaGSmith I love your tutorials!!! Thank you for all your work to help people like me! I would also love to know how I could record the event ID so that when I sync I don't get duplications but rather simple edits whether it's deleting an event, adding just the new events or editing and events. Can you help shed some light on this?
@varunsethi5662
@varunsethi5662 3 жыл бұрын
There are a few errors .. Please use getvalues() instead of getvalue() , Use i =1 not i =0 to avoid the header row
@stephanejaimeorts9642
@stephanejaimeorts9642 Жыл бұрын
Hi Varun, good evening. Seems like you are quite a pro on this topic, so since I do not see tons of responses from the author, would it be possible to kindly ask you to review my idea? Thank you very much in advance for your time!
@RussianShadowDragon
@RussianShadowDragon 4 жыл бұрын
Ah, yes, perfect, a video that references a crucial skeleton code that isn't provided anywhere... It isn't like I wanted to actually do what's shown in the video! ¬_¬
@wesleytitus8854
@wesleytitus8854 7 ай бұрын
Hi Thanks for the Video. I wrote the code to pull data from the spreadsheet and push into my calendar (one 1 week) with google app script. Its work well. It has created Events. But Instead of Events I want to create Tasks. Is there any method availabe for this ?
@mustafaalmansur2911
@mustafaalmansur2911 Жыл бұрын
HELP REQUEST: I used a google sheet to schedule my day, and I'd like this to be put in to my calendar. Now, if I use this script today, it will update my calendar today. But tomorrow when I use a different range within the sheet to update my plans for tomorrow, will today's stuff be deleted? My google sheet has 5 days for scheduling tasks, but I schedule each day in the morning. The days don't have a date field. Just start time, finish time, task name. At the end of the week, my google sheet is full. The week after that, I delete and start the next week. The question is, will my historical tasks/events be deleted in google calendar?
@alfa1760
@alfa1760 3 жыл бұрын
Cannot read property 'createEvent ' of null. Help me please
@Rob23580
@Rob23580 5 жыл бұрын
is it also possible to do it the other way around? To make a timesheet each week with the calendar as the source of the information?
@cregenda
@cregenda 5 жыл бұрын
I second this
@humbertobueno3799
@humbertobueno3799 3 жыл бұрын
I receive get the error: ReferenceError: volunteer is not defined (line 9, file "Code")
@MrThenikitos
@MrThenikitos 3 жыл бұрын
I have the same error. Did you fix it? Will appreciate your help.
@chehaselwood6254
@chehaselwood6254 4 жыл бұрын
Newbie here! I hope this get to someone and that someone(s) can HELP. Please please. I'm a principal of a Middle School and am trying to create Script that will Sync a Google Sheet with a School Team calendar. I can use the fields in this sample but I need one more: a description of the event. But I also need the Google Sheet (which changes) to be able to update the School Team Calendar to represent the changes (i.e., reschedules, time changes, cancellations, etc). Can anyone help????
@nicozing4552
@nicozing4552 2 жыл бұрын
Thank you!
@PearsonGroupChicago
@PearsonGroupChicago 5 жыл бұрын
Very helpful! Is there ability to then sync with Maps for routing schedules?
@JoannaGSmith
@JoannaGSmith 5 жыл бұрын
Oh man! That's a fun one, but yes! Maps is available for Apps Script as a service, particularly to help find directions! developers.google.com/apps-script/reference/maps/ and we even have a cool example, too: developers.google.com/apps-script/quickstart/custom-functions
@nhtp342501
@nhtp342501 9 ай бұрын
I was just wondering. Would it be possible to actually create a calendar event by submitting a google form? Without the possible or showing conflicting events on the same calendar? Google form to calander event? For elderly, and children ,is it possible? Thanks and blessed 2024
@DIOGOD28
@DIOGOD28 2 жыл бұрын
Hi Joanna & G-Suite Team, Need to schedule to run a macro at a particular time of the day? Any help would be useful
@pierrelanger4910
@pierrelanger4910 Жыл бұрын
incredible. Any way to make sure that there are no double entries in the calendar e.g. if the script gets fired 2 times with the same dates & times
@DynamixFilms
@DynamixFilms Жыл бұрын
Hi Joanna & G-Suite Team, Question about the shift events. Right now we can make the events last from a certain timeframe, such as 8am-1pm, how can I make them an 'all day' event instead? For instance, this person works all day from 11/10/22 through 11/30/22 And lastly, is there a way to have the google sheet completely sync with the Calendar? Meaning if I change the event in the calendar, can that update the google sheet & vice versa?
@ianjackson8506
@ianjackson8506 Жыл бұрын
Would it be possible to run it the opposite way? Say I wanted to have events from an existing calendar show up on the spreadsheet?
@davidsafori7248
@davidsafori7248 2 жыл бұрын
Please is it possible to schedule tasks rather than events?
@gedalyahreback2133
@gedalyahreback2133 5 жыл бұрын
Can you explain what is going on with the for loop here? I'm not sure how to apply it and you sort of skip over it in the video.
@JoannaGSmith
@JoannaGSmith 4 жыл бұрын
Yes, I did skip over it. But I wrote a follow-up post specifically for this, and it's linked in the video description. Check it out: medium.com/@dontmesswithjo/coding-basics-for-loops-90dca2873c70
@carlossabogal1317
@carlossabogal1317 3 жыл бұрын
Thanks! This is great. I'm trying to add the sync to calendar and it shows up in UI but when I click it gives me a message Script function not found: scheduleShifts. Am I missing something?
@barbieb3677
@barbieb3677 2 жыл бұрын
Trying to have a budget/bills to pay sheet merged with a bill calendar? Do I need to do this or is there a built in merge within google workspace which would seem logical.
@bkaberger
@bkaberger 5 жыл бұрын
Super helpful tip! Keep it up!
@JoannaGSmith
@JoannaGSmith 5 жыл бұрын
Thank you! :)
@vasukinagabhushan
@vasukinagabhushan 4 жыл бұрын
Does this code keep importing new signups into the calendar, as and when they are entered in Google Sheets?
@harkiransahota8430
@harkiransahota8430 3 жыл бұрын
Can you do this in reverse? Can you import events data from a calendar into a google sheet automatically?
@sottoventobeachclub9028
@sottoventobeachclub9028 3 жыл бұрын
GREAT Joanna, but i don't know why it doesent work, sintax error in the last point, cuold you help me?
@MichaelDaniels
@MichaelDaniels 3 жыл бұрын
I love the Google sheet and calendar integration. I want to create an add to calendar link to my spreadsheet. For example I have a list of live streams with date and times. I want to have in the last column a clickable link to add all the data to the right in the users calendar. Is this even possible? Do you have some script that would help with this?
@lisahubbard356
@lisahubbard356 2 жыл бұрын
Did you figure out how to do this? I'd like to be able to do this as well.
@MichaelDaniels
@MichaelDaniels 2 жыл бұрын
@@lisahubbard356 nope! I am so not a programmer but I think it would be an awesome thing
@eskervandewerken9431
@eskervandewerken9431 Жыл бұрын
Is there a way to overwrite the previously made event?
@IsabellaScorza
@IsabellaScorza 5 жыл бұрын
is it possible to input the event description?
@JoannaGSmith
@JoannaGSmith 4 жыл бұрын
Yep! Here's the documentation on adding additional "options": developers.google.com/apps-script/reference/calendar/calendar#createeventtitle,-starttime,-endtime,-options
@harsimransingh6601
@harsimransingh6601 2 жыл бұрын
Hi Joanna Can we include an incremented serial number in the Subject line of each incoming email. How can we achieve that please. ?
@ChristopherWiehl
@ChristopherWiehl 3 жыл бұрын
Is there a way to create the event, and add multiple people to the event and enable a google meeting link? Would be super helpful with all our meetings being virtual now.
@akshaysakure8265
@akshaysakure8265 5 жыл бұрын
I ran the whole thing as specified along with onOpen function. Both of them ran without error but the output didnt get reflected.. Neither the sheet got integrated with Calendar, nor their was a new Menu creation. Can you please help me at this at the earliest?
Apps Script - Create Calendar Event From a Form
9:12
Eamonn Cottrell
Рет қаралды 4,4 М.
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 75 МЛН
когда не обедаешь в школе // EVA mash
00:51
EVA mash
Рет қаралды 4,1 МЛН
How to Use Google Calendar Effectively | Full Tutorial
22:21
Anson Alexander
Рет қаралды 184 М.
Dynamic Calendar Google Sheets Tutorial + FREE template
28:29
thinklikeagirlboss
Рет қаралды 334 М.
Google Sheets - Add (Import) Events in Bulk to Google Calendar Using Apps Script Tutorial - Part 11
19:25
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 64 М.
View Your Google Calendar in a New Way with Google Sheets
6:05
📆 Google Calendar Tips and Tricks
13:10
Kevin Stratvert
Рет қаралды 548 М.
Google Sheets - Apps Script Google Calendar API  Integration Tutorial - Get Events - Part 10
30:52
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 125 М.
How to combine AppSheet with Apps Script - Video tutorial
11:14
Google Workspace Developers
Рет қаралды 42 М.
Time to Ditch Google Calendar (and Outlook)
18:11
Efficient App (Alex & Andra)
Рет қаралды 59 М.
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 75 МЛН