Note: This README was AI-generated and reflects the current state of the automation scripts.
A collection of Google Apps Script automations to supercharge your Google Calendar with smart features like prefix-based coloring, intelligent meeting detection, and container-based event grouping.
Quickly format events with simple prefixes that auto-remove after processing:
| Prefix | Effect | Example |
|---|---|---|
o |
Orange color | o client meeting β Orange event titled "client meeting" |
r |
Red color | r urgent deadline β Red event titled "urgent deadline" |
y |
Yellow color | y brainstorm session β Yellow event titled "brainstorm session" |
f |
Free time (transparent) | f optional lunch β Event marked as "Free" |
daily |
Daily recurrence (no end) | daily standup β Repeating daily event titled "standup" |
All prefixes are case-insensitive: O , R , DAILY work just as well!
Automatically detects and enhances meeting events:
Detection criteria:
- Keywords in title:
meet,meeting,call,go,train,ride - Meeting platforms in description/location: Google Meet, Zoom, Webex, GoToMeeting, Calendly, Zeeg
- Events with attendees
- Events already colored red
Auto-enhancements:
- β Colors meeting RED
- β Adds 3-minute reminder (preserves your other reminders)
- β Smart detection (won't remove manually set reminders)
Move multiple events together like a folder!
How it works:
- Create an event with "glue" anywhere in the title (e.g.,
Glue morning routine) - Create events inside the glue's time window (e.g., workout 9:00-9:30, breakfast 9:30-10:00)
- Move the glue event β all contained events move with it!
Features:
- β Auto-capitalizes "glue" β "Glue"
- β Automatically colored GRAY
- β Marked as "Free" time (doesn't block calendar)
- β Position-based detection (no manual attachment needed)
- β Maintains relative positioning when moved
Perfect for:
- Morning/evening routines
- Client project blocks (prep β meeting β followup)
- Travel itineraries (flight β hotel β rental car)
- Google Account with Google Calendar
- Node.js (v4.7.4 or later)
- npm (comes with Node.js)
1. Install clasp (Command Line Apps Script)
npm install -g @google/clasp2. Enable Google Apps Script API
Visit https://script.google.com/home/usersettings and toggle on "Google Apps Script API"
3. Authenticate clasp
clasp loginThis opens a browser window to authorize clasp with your Google account.
4. Clone this repository
git clone https://github.com/ArtyMcLabin/GoogleCalendar_ExtendedFeatures_Appscript.git
cd GoogleCalendar_ExtendedFeatures_Appscript5. Create your Apps Script project configuration
# Create a new Apps Script project
clasp create --title "Calendar Automation" --type standaloneThis creates a .clasp.json file with your new Script ID.
OR if you prefer to use an existing project, copy the example:
cp .clasp.json.example .clasp.json
# Then edit .clasp.json and replace YOUR_SCRIPT_ID_HERE with your actual Script ID6. Deploy to Apps Script
clasp push7. Set up Calendar trigger
-
Open the Apps Script editor:
clasp open
-
In the Apps Script editor:
- Click Triggers (clock icon) in left sidebar
- Click + Add Trigger (bottom right)
- Configure:
- Function:
dispatchCalendarUpdates - Event source: From calendar
- Calendar owner: Your email
- Event type: Calendar updated
- Function:
- Click Save
-
Authorize the script when prompted
Done! Your calendar automation is now active.
All settings are in Code.js under the CONFIG object:
var CONFIG = {
LOCK_TIMEOUT_MS: 30000, // Lock timeout (30 seconds)
MEETING_REMINDER_MINUTES: 3, // Default meeting reminder time
COLOR_PREFIXES: {
ORANGE: 'o ',
RED: 'r ',
YELLOW: 'y ',
FREE: 'f ',
DAILY: 'daily '
},
MEETING_KEYWORDS: ['meet', 'meeting', 'call', 'go', 'train', 'ride'],
MEETING_METHODS: ['meet.google.com', 'zoom.us', 'webex.com', ...]
};Customize these values to match your preferences!
Create: "r submit report"
Result: Red event titled "submit report"
Create: "o team check-in"
Result: Orange event titled "team check-in"
Create: "daily morning review" (9:00 AM - 9:15 AM)
Result: Daily recurring event titled "morning review"
1. Create: "Glue project work" (2:00 PM - 5:00 PM)
2. Create: "kickoff meeting" (2:00 PM - 2:30 PM)
3. Create: "development time" (2:30 PM - 4:30 PM)
4. Create: "code review" (4:30 PM - 5:00 PM)
5. Move "Glue project work" to 10:00 AM - 1:00 PM
β All three events move automatically!
debugShowAllGlueData()- View all stored glue event dataclearAllProperties()- Reset all glue tracking datacheckAndUpdateGlueEvents()- Manually re-process all glue events
- Open Apps Script editor:
clasp open - Click Executions in left sidebar
- Click on an execution to view logs
Note: clasp logs requires GCP project setup (not configured by default)
- β No hardcoded credentials or API keys
- β Uses Google's OAuth for authentication
- β All processing happens in your Google Apps Script environment
- β No data sent to external servers
- β
OAuth tokens stored locally (
.clasprc.json- gitignored)
Script ID in .clasp.json is safe to commit - it's a public identifier, not a secret.
Processing Flow:
- Calendar event created/modified
- Google triggers
dispatchCalendarUpdates() - Script fetches recent events (last 30 seconds)
- Processes each event based on type:
- Prefix β Color/settings applied
- Meeting β Auto-detected and enhanced
- Glue β Container tracking updated
- Results visible in ~15-20 seconds
Key Design Principles:
- β Idempotent (safe to run multiple times)
- β No description tag pollution (clean UI)
- β Event-specific processing markers
- β 30-second window for rapid event creation
- β Lock mechanism prevents concurrent conflicts
# Edit code in your favorite editor
code Code.js
# Deploy changes to Apps Script
clasp push
# Pull changes from Apps Script (if edited in web UI)
clasp pullgit add .
git commit -m "Description of changes"
git pushImportant: GitHub pushes do NOT automatically deploy to Apps Script. Always run clasp push to deploy.
Events not processing:
- Wait 15-20 seconds after creating/editing (trigger delay + processing time)
- Check executions in Apps Script editor for errors
- Verify trigger is active
Glue events not moving contained events:
- Ensure contained events are FULLY inside the glue window
- Wait 20 seconds after creating each event before moving
- Run
debugShowAllGlueData()to check storage
Lock timeout errors:
- Multiple triggers firing too quickly
- Normal behavior - subsequent triggers wait for first to complete
- If persistent, increase
LOCK_TIMEOUT_MSin CONFIG
MIT License - See LICENSE file for details
Contributions welcome! Please feel free to submit a Pull Request.
Created with assistance from Claude (Anthropic AI) for personal calendar automation needs.
Latest: v0.34 (October 2025)
- Added yellow color prefix (
y) - Added free time prefix (
f) - Added daily recurrence prefix (
daily) - Fixed glue event processing performance (10x faster)
- Removed description tag pollution
- Critical lock timeout fix
See commit history for detailed changelog.