Skip to content

Instantly share code, notes, and snippets.

View ogoldberg's full-sized avatar

Oren Goldberg ogoldberg

View GitHub Profile
@ogoldberg
ogoldberg / Google Calendar for Teams.gs
Last active September 26, 2024 19:29 — forked from mburtscher/Google Calendar for Teams.gs
Slack "Google Calendar for Teams" replacement
var webhookUrl = 'https://hooks.slack.com/services/XXXXXXXXXX/XXXXXXXXXX/XXXXXXXXXX'; // Webhook URL
var calendarId = '[email protected]'; // Id of the calendar
var slackChannel = '#team-calendar'; // Name of Slack channel to post updates to
var threshold = 30; // Seconds to look back after "onEventUpdated" event was received
var messageSingle = 'There is *1 event*';
var messageMultiple = 'There are *{events} events*';
var messageCreated = 'A *new event* has been created:';
function sendDailyEventsSummary() {
sendEventsSummary(1, "today")