Skip to content

Aristide021/google-calendar-cohort-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

WGU Cohort Calendar Sync

I created this Google Apps Script to solve a calendar management challenge with my WGU cohort sessions. Gmail has a fantastic feature that can automatically detect events in emails and add them to your calendar - something Microsoft Outlook lacked. Rather than manually adding each cohort session to my calendar, I decided to forward these emails to my Gmail account and leverage Google's powerful Apps Script platform to ensure reliable event detection, regardless of the varying date/time formats and timezone notations in the emails.

Why Google Apps Script?

I chose Apps Script for several strategic reasons:

  • Native integration with Gmail and Google Calendar APIs
  • Server-less architecture with zero hosting costs
  • Direct access to Google Workspace services
  • Streamlined deployment and maintenance
  • Built-in OAuth security handling
  • Built-in logging and debugging tools

Status

This project demonstrates automated calendar management using Google Apps Script's capabilities. It's provided as-is and was last tested in January 2024. While I built this to solve my specific needs, I'm sharing it for others facing similar challenges. I welcome suggestions and contributions as I continue to learn and improve my development skills.

Features

  • Automatically processes emails with cohort schedules
  • Handles multiple timezone formats
  • Creates calendar events with proper timing
  • Manages updates and cancellations
  • Adds configurable email and popup reminders
  • Supports batch processing
  • Comprehensive logging

Prerequisites

  • Google Workspace account
  • Access to Gmail and Google Calendar
  • Ability to create and run Google Apps Scripts

Quick Start

  1. Create a new Google Apps Script project
  2. Copy all the code from the cohort-sync.js file
  3. Create two Gmail labels:
    • "School/Cohort" (for new emails)
    • "School/Cohort-Processed" (for processed emails)
  4. Save and run the script
  5. Grant necessary permissions
  6. Set up trigger (optional)

Configuration

The script can be configured by modifying the CONFIG object at the top of the file:

const CONFIG = {
  LABEL_NAME: "School/Cohort",
  PROCESSED_LABEL_NAME: "School/Cohort-Processed",
  BATCH_SIZE: 10,
  EVENT_WINDOW_MINUTES: 30,
  DEFAULT_DURATION_MINUTES: 60,
  REMINDERS: {
    EMAIL: 60, // minutes before
    POPUP: 10  // minutes before
  },
  LOG_LEVEL: 'INFO' // 'DEBUG', 'INFO', or 'ERROR'
};

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published