Skip to content

Instantly share code, notes, and snippets.

@ttsukagoshi
Created January 18, 2020 17:26
Show Gist options
  • Save ttsukagoshi/ca172c30ed7303bb960f67b5414b9568 to your computer and use it in GitHub Desktop.
Save ttsukagoshi/ca172c30ed7303bb960f67b5414b9568 to your computer and use it in GitHub Desktop.
Google App Script to check the iCalID of a specific Google Calendar event.
/**
* Google App Script to check the iCalID of a specific Google Calendar event.
* You need to have access to the Google Calendar, as designated by the Google Calendar ID
*/
function checkICalId() {
var calendarId = 'myCalendarID@group.calendar.google.com';
var startTime = new Date('2020-01-18T17:15+0900');
var endTime = new Date('2020-01-18T17:15+0900');
var events = CalendarApp.getCalendarById(calendarId).getEvents(startTime, endTime);
for (var i = 0; i < events.length; i++) {
var event = events[i];
var eventTitle = event.getTitle();
var eventICalId = event.getId();
Logger.log('Title: ' + eventTitle + ', iCalId: ' + eventICalId);
}
}
@ttsukagoshi
Copy link
Author

@josueal1 Thanks for sharing your project; I think that's a great idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment