This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sync() { | |
// CHANGE - id(s) of the secondary calendar to pull events from | |
// If you have more than one calendar, use the form ["XXXXXX", "YYYYY"] | |
var ids=["XXXXXXXXXX"]; | |
var today=new Date(); | |
var enddate=new Date(); | |
enddate.setDate(today.getDate()+7); // how many days in advance to monitor and block off time | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sync one or more personal calendars to a work calendar - and you can sync the work calendar back to | |
// your personal calendars too! Put this into a Google Apps Script and set up an hourly trigger. | |
// | |
// IMPORTANT: To run the script, you must enable the "Calendar API" under the "Services" menu on the left | |
// of the Google Apps Script IDE. | |
// | |
// Author: Oliver J. Woodford https://gist.github.com/ojwoodford | |
// Small tweaks: Valerie Aurora | |
function SyncMyCal() { | |
var options = { |