Category : google-calendar-api

var freeRequest = gapi.client.calendar.freebusy.query({ items: [ {id: calendarid} ], “timeMin”: `”${date.value}T${startTime.value}:00.000Z”`, “timeMax”: `”${date.value}T${endTime.value}:00.000Z”`, “timeZone”: “GMT+01:00”, }); I want to check if a calendar is busy via the freebusy query I know the request only works with the date format: YYYY-MM-DDTHH:MM:SS.MMMZ . My plan was to paste the value that I get from an html input ..

Read more

So I managed to combine Google form, google calendar, as well as google sheets. When people submit the form (with start date and end date), it will automatically appear in the google sheets as well as google calendar. I modified the script to find conflict (to prevent double-booking), however I just realized that even when ..

Read more

So I’m using Calendar’s calendar list REST method to retrieve all of the users calendar’s. This endpoint to be specific: https://www.googleapis.com/calendar/v3/users/me/calendarList And this is working fine for 99% of my users. Unfortunately some have reported that my app isn’t showing them the calendars that they own, particularly their ‘main’ calendar. Upon further investigation I’ve tried ..

Read more

I need help in Creating a google apps script to create events in Google Calendar, following the code I’m using but gives the error "Cannot read property ‘setColor’ of null" for color settings. function myFunction() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheetByName("Test jun") var index = 2; var lastRow = sheet.getLastRow(); for (; ..

Read more

I’ve subscribed to a calendar with the following command: calendar.events .watch({ calendarId: aCal.id, requestBody: { id: uuid.v1(), type: "web_hook", address: ‘http://mywebsite.com’, }, }) .catch((e) => e) Each time I create an event, I receive a notification with "x-goog-resource-id":"unzJsxcVNifZI5ogOmIKRJ3Oiog". What is this id? Google documentation states it’s an "opaque resource id", but when I try to ..

Read more

I want to copy and modify all day holidays to my calender. I stumble over a seemingly well-located issue: GAS cannot read the weekday of the event start date. I suspect that the command .getAllDayStartDate() is delivering the date in a format that cannot be read by the getDay() command: var eventStartDay = new Date(eventsInPeriod[i].getAllDayStartDate()); ..

Read more