7 Commits

Author SHA1 Message Date
2f88eb119d Add execution logging to logs/ directory
Each run saves a timestamped log file (logs/YYYYMMDD_HHMMSS.log)
with full output. logs/ is gitignored.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 16:13:43 +02:00
f954b7ee38 Fix encoding, batch sync and field mapping
- Force UTF-8 stdout with line buffering to fix Windows encoding error
- Use batch_create/batch_update in Airtable sync (10x faster)
- Fix CampaignID field type (string, not int)
- Fix FechaEntrada → Fecha in leads query

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 16:10:56 +02:00
ef7d494aeb
Merge pull request #1 from jmgomezroi/claude/help-project-setup-t4hyw
Claude/help project setup t4hyw
2026-04-17 14:02:45 +02:00
Claude
67d5104dca
Sync campaign Status from Google Ads (ENABLED→Activa, PAUSED→Pausada)
Both on create and update, mirror the real Google Ads status instead
of defaulting to Pausada.

https://claude.ai/code/session_01WEcdWPxGWZKk8FGwBRLGR2
2026-04-17 11:52:38 +00: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
Claude
d68f9f5659
Sync Google Ads campaigns to Airtable before analysis
Before each run, fetch all non-removed campaigns from Google Ads
and upsert them into the Airtable campaigns table: new campaigns
are created (Activa=False, pending manual PPL/Cap/CPA setup) and
existing ones get their name updated if it changed.

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