FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
project logo
charmaineavailability-calendar
Sends PTO reminders to Slack from shared team Google Calendar
Public
Like
1
availability-calendar
Home
Code
4
README.md
googleCalendar.ts
C
main.ts
utils.ts
Branches
1
Pull requests
Remixes
History
Environment variables
1
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
README.md

PTO Slack Bot

Sends PTO reminders to Slack from shared team Google Calendar.

image.png

  • Monday: Weekly summary of ALL OOOs overlapping this week
  • Tue-Thu: Tomorrow reminders for NEW OOOs starting next day
  • Fri-Sun: No notifications

Setup

1. Google Calendar Connection

  1. Remix this val

  2. Go to pipedream.val.run

  3. Configure the following for your shared calendar:

    image.png

  4. Copy the generated code into googleCalendar.ts

2. Slack Webhook

  1. Go to api.slack.com/apps
  2. Create app → From Scratch → Select workspace
  3. Incoming Webhooks → Toggle ON → Add New Webhook
  4. Select your #ooo channel → Copy webhook URL
  5. Add environment variable: SLACK_WEBHOOK_URL = webhook URL

Implementation Notes

The code handles several edge cases that Google Calendar API presents:

  • All-day vs timed events: All-day events use date format while timed events use dateTime
  • API pagination: Must specify timeMin/timeMax parameters to get all events
  • Event consolidation: Multiple PTO entries for same person are merged into date ranges
  • Partial days: Timed events less than 8 hours are marked as "partial"
  • Name extraction: Supports both [name] PTO format and first-word extraction from titles
Cron
  • main.ts
Code
README.mdgoogleCalendar.ts
C
main.ts
utils.ts
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.