4
votes

For the past few months my office has been using a system where we submit a google form to take leave or travel. This form automatically populates a google sheet, and then in turn auto-pops onto a shared calendar. Today it stopped working. I went into the code, and I get the error 'Invalid conference name value (line 111, file "Code"'.

I did some experimenting, and if I change the 'var calendarId' to = my personal email address at work then it posts to my calendar with no problem. If I change it back to the shared calendars address it gives the error.

At this point I don't think my code is broken, I feel like my agency (gov't) has limited my ability to use code to post to a shared calendar. Am I missing something here? Any thoughts appreciated. Thanks!

/**
* Creates an event in the user's default calendar.
*/
function createEvent(title,startDt,endDt,desc,loc, col) {
var calendarId = 'THIS IS WHAT IS CAUSING THE PROBLEM';
Logger.log(typeof(startDt))
var start = new Date(startDt);
**var startISO = start.toISOString();**
var end = new Date(endDt);
var endISO = end.toISOString();
var event = {
summary: title,
location: loc,
description: desc,
start: {
dateTime: startISO
},
end: {
dateTime: endISO
},
// Sets the calendar color
colorId: col
};
event = Calendar.Events.insert(event, calendarId);
Logger.log('Event ID: ' + event.getId());
}

So this morning I come in, ad I no longer get the invalid error from last week. Now I'm getting a new error, 'RangeError: Date is invalid. (line 95, file "Code")

1
What is at line 111 of the code. - Munkey
@Matt I am seeing the same problem with our ruby code starting from yesterday. I have updated us to the latest official client libraries and still getting the same error. I believe this is an issue on Google's side as the 'conference name' field is not documented anywhere. You can submit an issue to the google calendar API team here - Reza Olfat
The page on Google Developers that demonstrates how to add events to a calendar is throwing the same error (as of 3/24/16, 5:00 pm pdf): developers.google.com/google-apps/calendar/create-events - Jim Miller
Thanks for the responses. Glad to see I'm not the only one. It's working today! But now I have a new issue. Now it doesn't like my date formats for some reason. I'll try to post on that later. - Matt
Back up for me, too. - Jim Miller

1 Answers

0
votes

for me using color ids 1-11 worked. Calendar.Colors.get() returned more ids but those >11 resulted in that error