Skip to content

Instantly share code, notes, and snippets.

// TODO: loop through updatetimes[] to get multiple notifications about events starting.
// This Google Apps Script Will Send a POST to a Discord Webhook creating embed messages of any events starting within the next minute of execution.
// Any events that have already started will not appear.
// This script should be triggered every minute using Google Triggers.
const CHANNEL_POST_URL = "https://discord.com/api/webhooks/1003371753772437534/43lGojtgtcLZFgwWr3LgjC665M4lt2q4ml7MaVHjqUkyO_0J9jPmNuijhe7A6Rwzr1hq";
const CALENDAR_ID = "mscroboticsdev@gmail.com";
const NO_VALUE_FOUND = "N/A";
const minsInAdvance = 15; // Set the number of minutes in advance you'd like events to be posted to discord. Must be 1 or greater