Add A4 webhook monitor and Live Campaign field to webhooks
New A4 monitoring script + updated A1→A2 webhook with Live Campaign indicator.
NEW SCRIPT: a4_webhook_monitor.py
- Monitors campaigns with status A4
- Sends webhook when A4 campaigns found
- A4 = Campaign NOT going live
- Webhook payload includes: "live_campaign": "NO"
A4 WEBHOOK PAYLOAD:
{
"campaign_id": "abc123...",
"campaign_number": "C000000078",
"campaign_name": "Campaign Name",
"status": "A4",
"live_campaign": "NO", ← NEW FIELD!
"timestamp": 1234567890,
"message": "Campaign marked A4 - Not going live"
}
A1→A2 WEBHOOK UPDATE:
Added "live_campaign": "YES" to existing webhook
- A1→A2 campaigns ARE going live
- Webhook now includes live campaign indicator
A1→A2 WEBHOOK PAYLOAD (UPDATED):
{
"campaign_id": "abc123...",
"campaign_number": "C000000078",
"campaign_name": "Campaign Name",
"old_status": "A1",
"new_status": "A2",
"live_campaign": "YES", ← NEW FIELD!
"asset_count": 5,
"processed_assets": [...],
"timestamp": 1234567890
}
EMAIL NOTIFICATION:
NEW: a4_webhook_sent template
- Gray theme for A4 status
- Shows "Live Campaign: NO" prominently
- Lists webhook URL and payload details
USAGE:
Default (OAuth2):
python scripts/a4_webhook_monitor.py
With mTLS:
python scripts/a4_webhook_monitor.py --auth-pfx
CRON SCHEDULE (same as other workflows):
*/5 * * * * cd ~/Python-Version && venv/bin/python scripts/a4_webhook_monitor.py >> logs/cron_a4.log 2>&1
WORKFLOW SUMMARY:
- A1→A2: Webhook with "live_campaign": "YES" (going live)
- A4: Webhook with "live_campaign": "NO" (not going live)
- A5→A6: No webhook (rework workflow)
- B1→B2: No webhook (global masters)
Changes:
- NEW: scripts/a4_webhook_monitor.py (200 lines)
- EDIT: scripts/a1_to_a2_download.py (added live_campaign: YES)
- EDIT: scripts/shared/notifier.py (added a4_webhook_sent template)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>