Closed heymeee closed 7 years ago
any help more than welcome please i can t synch anymore from sheet to cal
Sorry for the delay. Somebody else proposed a code change that will update changed events instead of deleting and adding them again. That would cut down on the number of adds and deletes and maybe fix the issue. I'll take a look at that.
ho hello thank you so much, it s what i m trying to figure out too ;) where can i find this code change ? have nice day Dave
Hi @heymeee, let's move the discussion from the PR.
I tried adding multipple events with invites, and I found the limit that google allows is lower than the limit for events with out invites. I also found out that once you get the message it will appear more often on the same day.
A problem with the script, as it is now, is that if you get an error on the 100th event the Ids of the previous 99 are not saved to the sheet, so if you run the script again you will get an duplicate events.
I managed to insert 25 events with two invites each before getting the error message. Maybe the script can insert in batchs of 20 events, save to the sheet, wait one second and continue.
I found a bug that was triggering this error for me: If you're not using the guests functionality, then in eventMatches
, the check convertedCalEvent.guests == sev.guests
will always return false, because the former is ""
but the latter is undefined
, and "" == undefined
evaluates to false
in Javascript.
This bug causes the code to think that every row has changed, and updateEvent
will make multiple unnecessary API calls per event, in rapid succession.
Hi @bradenmacdonald, great you could find the error. Maybe you could make a PR with the bugfix.
Nice find. I can take a look at it. I think the same thing would happen with the description field. Most people would probably include it in the spreadsheet, but it's not required.
Should be fixed now for the optional fields, description, location, and guests.
I'm going to close this issue for the time being. Re-open or start a new issue if this error continues to be a problem.
Hi Dave i ve been using the script a lot thank you i have like 200 events in the sheet and each time i try to update to calendar , iget the error message, "You have been creating or deleting too many calendars or calendar events in a short time. Please try again later." i worked fine but , i added like 120 events to the sheet and still worked fine, but now it seem to be stucked,,it s been stuck for 2 days now,, how can i still use the script ? should i change the values here : numAdds++; if (numAdds > 10) { Utilities.sleep(75); }
it s very useful for me,, it still works in the other way,, from cal to sheet thanks for your help here is the script you moddified to add guests.
thanks for your help