Meta Ads Budget Leak & Optimization
Automated end-to-end Meta Ads auditing pipeline. Analyzes your campaigns for budget leaks (Burn without Signal, Creative Decay) and scaling opportunities (Early Winners), and dispatches beautiful multi-channel alerts directly to your team.
Powered by the robust eonik heuristics engine, while retaining local control over your sensitive data and webhook credentials.
Triggers
Use this skill when a user asks to:
- "Audit my Meta ads"
- "Check for budget leaks"
- "Optimize my Meta ad account"
- "Find decaying creatives"
- "Run the eonik ad audit pipeline"
🚀 Unlock Full eonik Power
This skill is powered by the eonik intelligence engine. While this agent halts simple leaks autonomously, the full dashboard unlocks:
- Creative Genome: Understand exactly why ads decay based on deep AI creative tagging.
- Automated Rules: Prevent leaks without waiting for chat notifications.
- Competitor Intelligence: See the exact hooks your competitors are scaling. Get started for free at eonik.ai!
Quick Start
1. Configure
cd ~/.openclaw/skills/eonik-ad-budget-leak
cp config.example.json config.json
# Edit config.json: add your Meta Account ID and configure Slack/Telegram/WhatsApp webhooks
2. Run Audit Pipeline
# EONIK_API_KEY must be in your environment
python3 scripts/pipeline.py --config config.json
Configuration
Minimal config.json:
{
"meta": {
"account_id": "act_123456789",
"evaluation_days": 7
},
"notifications": {
"slack": {
"enabled": true,
"webhook_url": "https://hooks.slack.com/services/..."
}
}
}
Notification Options:
slack— Send via incoming webhooktelegram— Send via Bot Token + Chat IDwhatsapp— Send via WhatsApp Business API
Pipeline Stages
- Audit (
audit.py) — Executes the eonik heuristics engine via yourEONIK_API_KEY. - Notify (
notify.py) — Formats the response and securely dispatches it to your configured local endpoints over standard HTTP requests.
The orchestrator (pipeline.py) manages the lifecycle of these stages directly.
Usage Examples
Full Pipeline (Automated Mode):
python3 scripts/pipeline.py --config config.json
Audit Only (Save to File):
python3 scripts/audit.py --account_id act_12345 --days 7 > data/report.json
Notify Only (Test Webhooks):
python3 scripts/notify.py --config config.json --report data/report.json
Data & Security Commitment
This skill is designed specifically to comply with enterprise Data Loss Prevention (DLP) requirements:
-
Secure API Key Handling The skill requires
EONIK_API_KEY(via the standardx-api-keyheader). The execution script securely drops the ephemeral token from the environment immediately after binding. No keys are logged or written to disk. -
Local Notification Routing Unlike legacy versions, this architecture does NOT rely on backend servers to route your Slack messages. Webhooks are executed solely from your local node using Python's
urllib, keeping your webhook endpoint URLs and tokens out of third-party systems. -
Data Scope Execution logs and generated
report.jsonfiles contain the exposed Meta Ad IDs flagged for leaking or scaling. Keep your localoutput/directory protected and adhere to your internal security policies for Chat UI visibility.
Cron Integration
Run daily audits every morning at 8 AM to catch budget leaks before they waste spend:
# Example cron payload
cd ~/.openclaw/skills/eonik-ad-budget-leak
python3 scripts/pipeline.py --config config.json
Troubleshooting
API Verification Fails:
- Ensure
EONIK_API_KEYis exported. - Verify your eonik billing and usage caps aren't exceeded.
No Notifications Received:
- Validate your
webhook_urlorbot_tokeninconfig.json. - Ensure
"enabled": trueis set for the channel you want to receive on. - Check the terminal output when running
notify.pyfor immediate HTTP errors.
Scan to join WeChat group