Notification Delivery Skill
Purpose
Deliver meeting preparation notifications via Telegram and email with report summaries.
Delivery Channels
1. Telegram Notification
Target: Main Telegram session (1961555058)
Timing: Immediately after report deployment
Format: Structured message with key highlights
📋 **Meeting Prep Ready: {Product} Marketing**
🗓 **Tomorrow {time}** - {meeting_title}
📊 **Key Metrics:**
• CPI: ${cpi} ({trend_indicator})
• Spend: ${daily_spend} ({vs_target})
• Conversions: {conversions} ({trend})
🎯 **Top Insights:**
• {insight_1}
• {insight_2}
⚠️ **Attention Required:**
{critical_alerts}
📋 **Full Report:** {report_url}
2. Email Notification
Target: noam@44pixels.ai
Subject: Meeting Prep: {Product} Marketing - {Date}
Format: Executive summary + full report link
<!DOCTYPE html>
<html>
<head>
<style>
.alert-high { color: #dc3545; font-weight: bold; }
.alert-medium { color: #ffc107; font-weight: bold; }
.metric-up { color: #28a745; }
.metric-down { color: #dc3545; }
.metric-neutral { color: #6c757d; }
</style>
</head>
<body>
<h2>📋 Meeting Prep: {Product} Marketing</h2>
<p><strong>Meeting:</strong> {meeting_title}<br>
<strong>Time:</strong> Tomorrow at {meeting_time}<br>
<strong>Duration:</strong> {duration} minutes</p>
<h3>📊 Performance Snapshot</h3>
<ul>
<li><strong>CPI:</strong> <span class="{cpi_trend_class}">${cpi} ({cpi_trend})</span></li>
<li><strong>Daily Spend:</strong> <span class="{spend_trend_class}">${daily_spend} ({spend_trend})</span></li>
<li><strong>Conversions:</strong> <span class="{conv_trend_class}">{conversions} ({conv_trend})</span></li>
</ul>
<h3>🎯 Key Discussion Points</h3>
{key_insights_html}
<h3>⚠️ Alerts Requiring Attention</h3>
{alerts_html}
<p><a href="{report_url}" style="background-color: #007bff; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px;">📋 View Full Report</a></p>
<p><small>Generated by Chief of Staff • {timestamp}</small></p>
</body>
</html>
Message Personalization
Context-Aware Content
- High-performing meetings: Focus on opportunities and scaling
- Struggling campaigns: Emphasize problems and solutions
- Competitive threats: Highlight competitive intelligence
- Creative fatigue: Surface creative pipeline and testing
Alert Prioritization
def prioritize_alerts(alerts):
priority_map = {
'budget_overspend': 'HIGH',
'cpi_spike': 'HIGH',
'conversion_drop': 'HIGH',
'competitor_launch': 'MEDIUM',
'creative_fatigue': 'MEDIUM',
'market_shift': 'LOW'
}
return sorted(alerts, key=lambda x: priority_map.get(x.type, 'LOW'))
Metric Trend Indicators
- 📈 Strong Growth: >15% improvement
- 📊 Moderate Growth: 5-15% improvement
- ➡️ Stable: -5% to +5% change
- 📉 Declining: 5-15% decline
- 🔴 Alert: >15% decline or critical threshold
Delivery Logic
Success Validation
def validate_delivery():
# Telegram delivery
telegram_success = message_tool_response.get('ok', False)
# Email delivery
email_success = email_send_response.status_code == 200
# Report accessibility
report_accessible = requests.get(report_url).status_code == 200
return {
'telegram': telegram_success,
'email': email_success,
'report': report_accessible,
'overall': all([telegram_success, email_success, report_accessible])
}
Failure Handling
- Telegram Failure: Log error, attempt retry once, continue with email
- Email Failure: Log error, ensure Telegram delivered successfully
- Report Failure: Emergency notification about broken report link
- Complete Failure: Escalate to error monitoring, manual intervention
Delivery Confirmation
# Log successful delivery
log_delivery_status({
'meeting_id': meeting.id,
'product': meeting.product,
'report_url': report_url,
'telegram_delivered': telegram_success,
'email_delivered': email_success,
'delivery_time': datetime.now(),
'recipient': 'noam@44pixels.ai'
})
Quality Control
Pre-Delivery Checks
- Report URL is accessible and renders properly
- All key metrics are present and formatted
- Alerts are prioritized and actionable
- Meeting details are accurate (time, attendees)
- Sensitive data is appropriately handled
Message Testing
- Telegram message renders properly on mobile
- Email displays correctly across email clients
- Links are clickable and lead to correct destinations
- Formatting preserves readability
- Character limits respected (Telegram: 4096 chars)
Post-Delivery Monitoring
- Monitor report access patterns
- Track click-through rates from notifications
- Collect feedback on report usefulness
- Adjust formatting based on user engagement
- Optimize delivery timing based on open rates