Auto-switch music scenes by workday schedule and send matching GIF greeting emails. Combines home-music scene control with IMAP/SMTP email for a full morning...
---
name: workday-music-greet
description: Auto-switch music scenes by workday schedule and send matching GIF greeting emails. Combines home-music scene control with IMAP/SMTP email for a full morning-to-evening ambient workflow.
version: 1.0.0
author: OpenClaw Workspace
tags: ["music", "automation", "email", "workday", "cron"]
triggers:
- workday music
- music schedule
- greeting email
- daily music scene
metadata:
openclaw:
requires:
bins: ["node", "npm"]
emoji: "๐๏ธ๐ต"
---
# Workday Music & Greet
Automate your workday with timed music scene switches and GIF-enhanced greeting emails.
## What It Does
| Time | Scene | Email Greeting |
|------|-------|---------------|
| 07:30 | ๐
Morning | "Good morning! Start fresh โ๏ธ" + sunrise GIF |
| 09:00 | ๐ผ Focus | "Deep work time ๐ฏ" + focus GIF |
| 12:00 | ๐ฑ Break | "Lunch break! Recharge ๐" + food GIF |
| 14:00 | ๐ผ Focus | "Back at it! ๐ช" + coffee GIF |
| 17:30 | ๐ Chill | "Wind down time ๐ง" + sunset GIF |
| 22:00 | ๐ Off | "Good night! ๐" + moon GIF |
## Setup
### 1. Install Dependencies
```bash
cd skills/workday-music-greet
npm install
```
### 2. Configure Email (.env)
Create a `.env` file in the skill directory:
```bash
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=you@gmail.com
SMTP_PASS=your-app-password
SMTP_FROM=you@gmail.com
GREET_TO=you@gmail.com
```
### 3. Configure Music Scenes
Edit `scripts/config.json` to set your preferred scenes and `home-music` command path.
### 4. Register Cron Jobs
Run the setup script to register all timed triggers:
```bash
node scripts/setup-cron.js
```
Or set up manually โ each scene triggers `node scripts/scene-trigger.js <scene>`.
## One-Shot Usage
Trigger a scene + email manually:
```bash
node scripts/scene-trigger.js morning
node scripts/scene-trigger.js focus
node scripts/scene-trigger.js break
node scripts/scene-trigger.js chill
node scripts/scene-trigger.js off
```
## GIF Sources
Default GIFs are pulled from Giphy. To use custom GIFs, replace URLs in `scripts/config.json`.
## Architecture
```
workday-music-greet/
โโโ SKILL.md # This file
โโโ package.json # Dependencies (nodemailer)
โโโ scripts/
โ โโโ config.json # Scene & email configuration
โ โโโ scene-trigger.js # Main: switch scene + send email
โ โโโ send-greet.js # Email sending logic
โ โโโ setup-cron.js # Register OpenClaw cron jobs
โโโ assets/
โโโ email-template.html # HTML email template
```
## Dependencies
- **home-music** skill (for music scene control)
- **imap-smtp-email** skill (for email sending; reuses SMTP config)
- **OpenClaw cron** (for scheduled triggers)
## License
MITdon't have the plugin yet? install it then click "run inline in claude" again.