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
const DRY_RUN = false; | |
function getEventsForTomorrow() { | |
const timeZone = Session.getScriptTimeZone(); | |
let tomorrow = new Date(); | |
tomorrow.setDate(tomorrow.getDate() + 1); // get date for tomorrow | |
const tomorrowStr = Utilities.formatDate(tomorrow, timeZone, 'yyyy-MM-dd'); | |
// Get the events | |
const calendars = CalendarApp.getAllCalendars(); // get all calendars that the user owns or is subscribed to |
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
// Prerequisites: | |
// * You must have a Business or Enterprise Google Workspace account with access to Google Chat. | |
// * Your Google Workspace organization must let users add and use incoming webhooks. | |
// See: https://developers.google.com/workspace/chat/quickstart/webhooks | |
// | |
// Steps: | |
// 1. Create a standalone Google Apps Script Project. | |
// 2. Create a webhook URL in the Google Chat Space by following Google's official documentation above. | |
// 3. Save the webhook URL to as a Script Property and name it `chatWebHookUrl` | |
// 4. Copy & Paste the following script to your Apps Script project. |
OlderNewer