Delivers the .pptx report produced by build_ppt to one or more channels — local file copy and/or email (SMTP). Auto-generates email subject and body from insights.json if not provided. Returns a delivery receipt JSON.
Takes the latest .pptx from crawl_offers/artifacts/latest/ (or a specified path) and delivers it via configured channels.
cd /Users/test/.openclaw/workspace/skills/deliver_report
node dist/index.js '{"file": {"destDir": "/path/to/reports"}}'
# File delivery only
node dist/index.js '{"file": {"destDir": "/path/to/reports"}}'
# File delivery with custom filename (supports {brand}, {date}, {timestamp})
node dist/index.js '{"file": {"destDir": "/path/to/reports", "filename": "{brand}_CI_Report_{date}.pptx"}}'
# Email delivery only
node dist/index.js '{
"email": {
"to": ["[email protected]"],
"cc": ["[email protected]"],
"smtp": { "host": "smtp.example.com", "port": 587, "user": "[email protected]", "pass": "password" }
}
}'
# Both channels
node dist/index.js '{
"file": {"destDir": "/path/to/reports"},
"email": {
"to": ["[email protected]"],
"smtp": { "host": "smtp.example.com", "port": 587, "user": "[email protected]", "pass": "password" }
}
}'
# Explicit paths
node dist/index.js '{
"reportPath": "/path/to/report.pptx",
"insightsPath": "/path/to/insights.json",
"file": {"destDir": "/path/to/reports"}
}'
{
"status": "success",
"reportPath": "/.../artifacts/latest/report_Honda_2026-04-11.pptx",
"deliveredAt": "2026-04-11T03:00:00.000Z",
"focalBrand": "Honda",
"channels": [
{
"type": "file",
"status": "success",
"source": "/.../report_Honda_2026-04-11.pptx",
"destination": "/path/to/reports/report_Honda_2026-04-11.pptx"
},
{
"type": "email",
"status": "success",
"to": ["[email protected]"],
"subject": "Honda vs Toyota — Competitive Intelligence Report (2026-04-11)",
"messageId": "<[email protected]>"
}
]
}
status is:
"success" — all channels delivered"partial" — at least one channel succeeded, at least one failed"failed" — all channels failed (or no channels configured)If email.body is omitted, the body is auto-generated from insights.json and includes:
file or email must be provided.reportPath defaults to the most recently modified .pptx in crawl_offers/artifacts/latest/.insightsPath defaults to insights.json in the same directory as reportPath.insightsPath cannot be read, email subject/body fall back to generic templates.email.smtp.secure defaults to true when port is 465, false otherwise (STARTTLS).