4 Commits

Author SHA1 Message Date
7228cf1b65 Integración con OpenCode 2026-07-09 16:49:00 +02:00
3eec871d93 Add Slack summary report with daily metrics and campaign rankings
- New slack_reporter.py: posts daily summary to Slack after each run
- Shows monthly investment, revenue (sumatorio + leadsxPPL) and margins
- Rankings of best/worst fco_ campaigns for last 5 days and current month
- Alerts for campaigns with losses > 200€ or margin < -50%
- MetricasDiarias uses yesterday's data (Google Ads lag)
- SLACK_WEBHOOK_URL added to config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-30 12:38:10 +02:00
Claude
905ad3bcd2
Align field names with actual Airtable schema
- Campaigns: Status='Activa' filter (was Activa=TRUE), CPAMax (was
  CPAMaximo), add MargenObjetivo and CursoID Text per campaign
- Leads: filter by attr_cursoid + creado (was GoogleCampaignID + Fecha)
- analyzer: expose margen_objetivo and margen_ok per campaign
- config: remove global MARGEN_MINIMO, now per-campaign via Airtable
- sync: new campaigns created with Status='Pausada'

https://claude.ai/code/session_01WEcdWPxGWZKk8FGwBRLGR2
2026-04-17 11:48:52 +00:00
f0d7f65c1a Initial commit 2026-04-17 12:53:25 +02:00