Skip to content

Instantly share code, notes, and snippets.

View ttsukagoshi's full-sized avatar

TSUKAGOSHI Taro ttsukagoshi

View GitHub Profile
@ttsukagoshi
ttsukagoshi / RemindMyGoogleCalendar.js
Last active April 17, 2023 00:19
Remind myself of the events scheduled tomorrow in my Google Calendar. The notification will come to my Gmail.
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
@ttsukagoshi
ttsukagoshi / RemindMyGoogleCalendarOnChat.js
Last active January 28, 2025 15:26
A Google Apps Script to remind myself of the events scheduled tomorrow in my Google Calendar. The notification will be sent via a Google Chat Space.
// 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.