📅🎵 Workday Music Greeting
Music that matches your moment. A greeting that matches your mood.
Auto-switch Spotify playlists throughout the workday and send yourself (or your team) a cheerful greeting email with a scene-matched GIF at every transition.
🎬 Scenes & Schedule
| Time | Scene | Vibe | Playlist |
|---|---|---|---|
| 06:00–09:00 | 🌅 Morning | Gentle start | Peaceful Piano |
| 09:00–12:00 | 🎯 Focus | Deep work | Deep Focus |
| 12:00–14:00 | ☕ Break | Lunch recharge | Peaceful Piano (lighter) |
| 14:00–18:00 | 🎯 Focus | Deep work | Deep Focus |
| 18:00–21:00 | 🌇 Wind-down | Evening relax | Chill Lounge |
| 21:00+ | 🔇 Off | Silence | — |
| Weekend | 🏖️ Skip | No auto-scene | — |
📦 Dependencies
| What | Why |
|---|---|
🟢 Spotify CLI (spotify or spotify-applescript) | Play/pause/volume control |
| 📧 imap-smtp-email skill | Send greeting emails via SMTP |
| 🖼️ GIF files (optional) | Inline images in greeting emails |
🚀 Quick Start
1. Switch scene (auto-detect from time)
./scripts/workday-scene.sh
2. Switch to a specific scene
./scripts/workday-scene.sh morning
./scripts/workday-scene.sh focus
./scripts/workday-scene.sh break
./scripts/workday-scene.sh winddown
./scripts/workday-scene.sh off
3. Send a greeting email
./scripts/send-greeting.sh morning you@example.com
4. Full automation (scene + email)
./scripts/workday-automation.sh --email you@example.com --scene morning
Or let it auto-detect the scene:
./scripts/workday-automation.sh --email you@example.com
⏰ Cron Setup
Set up cron jobs for automatic workday switching. Example (Mon–Fri at 7:00 AM):
# Morning greeting
0 7 * * 1-5 /path/to/skills/workday-music-greeting/scripts/workday-automation.sh --email you@example.com --scene morning
# Focus mode
0 9 * * 1-5 /path/to/skills/workday-music-greeting/scripts/workday-automation.sh --scene focus
# Break
0 12 * * 1-5 /path/to/skills/workday-music-greeting/scripts/workday-automation.sh --email you@example.com --scene break
# Afternoon focus
0 14 * * 1-5 /path/to/skills/workday-music-greeting/scripts/workday-automation.sh --scene focus
# Wind down
0 18 * * 1-5 /path/to/skills/workday-music-greeting/scripts/workday-automation.sh --email you@example.com --scene winddown
# Off
0 21 * * 1-5 /path/to/skills/workday-music-greeting/scripts/workday-automation.sh --scene off
Or use OpenClaw cron for cloud-managed scheduling:
# In your OpenClaw session:
"Remind me to switch to morning music every weekday at 7 AM"
🖼️ Adding GIFs
Place animated GIFs in the gifs/ directory:
gifs/
├── morning.gif # Sunrise / coffee / stretching
├── focus.gif # Typing / headphones / laser focus
├── break.gif # Food / coffee break / walk
└── winddown.gif # Sunset / couch / relaxation
Tips:
- Keep GIFs under 2MB for reliable email delivery
- Use
gifs/README.mdas reference for naming conventions - If a GIF is missing, the email sends without the image (graceful degradation)
⚙️ Configuration
Edit scripts/workday-scene.sh to customize:
# Playlists (Spotify URIs)
PLAYLIST_MORNING="spotify:playlist:37i9dQZF1DX4WYpdgoIcn6"
PLAYLIST_FOCUS="spotify:playlist:37i9dQZF1DWZeKCadgRdKQ"
PLAYLIST_BREAK="spotify:playlist:37i9dQZF1DX4sWSpwq3LiO"
PLAYLIST_WINDOWN="spotify:playlist:37i9dQZF1DWTwnEm1IYyoj"
# Speaker
SPEAKER="Sonos Move"
# Volumes (0-100)
VOL_MORNING=35
VOL_FOCUS=25
VOL_BREAK=40
VOL_WINDOWN=30
Edit scripts/send-greeting.sh to customize email subjects and body HTML.
📁 File Structure
workday-music-greeting/
├── SKILL.md # This documentation
├── scripts/
│ ├── workday-scene.sh # Scene switching logic
│ ├── send-greeting.sh # Email sending with GIF
│ └── workday-automation.sh # Master orchestrator
└── gifs/
├── README.md # GIF naming guide
├── morning.gif # (user-provided)
├── focus.gif # (user-provided)
├── break.gif # (user-provided)
└── winddown.gif # (user-provided)
🔧 Advanced: Custom Scenes
Add new scenes in workday-scene.sh:
scene_workout() {
echo "💪 Workout scene"
"$SPOTIFY_CMD" play "spotify:playlist:YOUR_URI"
"$SPOTIFY_CMD" volume 80
}
# Add to case block:
workout) scene_workout ;;
Then add the matching email case in send-greeting.sh.
🐛 Troubleshooting
| Issue | Fix |
|---|---|
| Spotify not playing | Ensure Spotify app is running; check $SPOTIFY_CMD path |
| Email not sending | Verify SMTP env vars (SMTP_HOST, SMTP_USER, SMTP_PASS) |
| GIF not showing | Check file exists in gifs/ and name matches scene exactly |
| Weekend triggering | is_weekday() check should skip; verify system timezone |
Author: OpenClaw Workspace
Version: 1.0.0
License: MIT