A marketing agency that automates client reporting stops assembling reports by copy-paste. The key is not generating pretty PDFs — it's separating the deterministic calculation layer from the AI narrative with guardrails. KPIs in code, no hallucinations.
If you run a digital marketing agency in Colombia with 15 to 50 active clients and you're still generating monthly reports with copy-paste into Google Slides, this article gives you the correct architecture.
The typical state before automating reporting
A mid-sized Colombian agency with 30 active clients spends between 200 and 400 hours per month just generating reports: extracting data from Meta Ads, Google Ads, Analytics, HubSpot, and 5 to 10 other sources; pasting it into Google Slides or Looker Studio; writing the narrative of what happened this month; verifying that numbers reconcile across sources; adjusting per-client formatting and sending.
The operational problem is fourfold: data doesn't reconcile across sources because each platform defines conversion differently, the narrative gets written by the most junior account manager due to the senior's lack of time, reports are delivered late and without the depth the client is paying for, and the portfolio grows but human hours don't scale linearly.
The pattern: KPIs in code, AI for narrative only
In a recent project for a franchise chain, Catalizadora built advanced reporting with KPIs in code. The architecture applied is exactly what a marketing agency needs:
- All KPIs are calculated browser-side in pure JavaScript — zero server calls on each view
- The AI only receives the JSON with the already-calculated numbers and generates one explanatory paragraph per section
- Two-level pattern: numeric KPI headline on top, AI paragraph below explaining what it means
- Append-only audit trail with immutable SHA-256 hash chain, defensible in audits
- Browser-side compute means zero server CPU and zero variable cost per report
For a marketing agency with 30 clients, the same architecture applies: each client has its own workspace with standard KPIs (CPC, ROAS, CPL, CAC) and custom KPIs by industry; the narrative is generated by Claude or GPT-4o under a prompt that prohibits fabricating numbers. The code, data and domain are yours.
The 6 critical modules for a marketing agency
| Module | Function | Impact |
|---|---|---|
| KPI engine in TypeScript | Deterministic metric calculation | Critical |
| Connectors for Meta, Google, TikTok, LinkedIn Ads | Automated daily ingestion | High |
| Client portal with own login | Client accesses without receiving PDFs | High |
| AI narrative with guardrails | Explanatory text on verified data | Medium |
| Anomaly alerts | Notification when a KPI goes out of range | High |
| Immutable audit log | Compliance and defense in disputes | Medium |
The most underestimated module is anomaly alerts. Most agencies find out that a campaign went off the rails when the client complains. The right approach is an automatic alert to the team when ROAS drops 30% in 24 hours — before the client calls.
Why Looker Studio and DashThis don't solve this
Looker Studio is free but requires connectors that break, manual narrative, and parallel work in Slides. DashThis costs $49 to $599 USD per month depending on volume and models the report as a rigid template. AgencyAnalytics costs $49 to $459 USD per month and has the same limitations.
None of the three let you customize KPI logic by client industry, none integrate AI narrative under guardrails, and none leave you as the code owner. For a Colombian agency with 30 active clients, MAGIA Core builds the custom platform in 12 weeks, in the agency's name. Software in your name — not rented.
Recommended stack for a marketing agency
- Backend in FastAPI or Hono.js with scheduled jobs for daily ingestion from each connector
- PostgreSQL database on Supabase Pro or Neon, with materialized views for KPIs
- KPI engine in TypeScript with Zod for runtime schema validation
- Frontend in Next.js with server components, RSC streaming for heavy reports
- Connectors for Meta Marketing API, Google Ads API, Google Analytics Data API
- Narrative with Claude Sonnet via official API under prompt restricted to calculated inputs
- Audit log with SHA-256 trigger, immutable, append-only
- Client portal with Supabase Auth or Clerk authentication
The monthly operating cost depends on AI token volume and storage.
What assembling reports by hand costs today
Run the numbers with your own figures. If your team spends 200 hours a month on reports and an account manager hour costs 35,000 COP, that is 7,000,000 COP a month just to assemble reports. A good share of that manual work is what automation cuts, and those hours go back to serving clients and selling.
How to get started without disrupting operations
The MAGIA Core implementation phase for an agency with 30 clients:
- Weeks 1 and 2 — Discovery: interviews with each account manager and each priority client
- Weeks 3 and 4 — Architecture: KPI blueprint (standard and custom), migration plan
- Weeks 5 to 8 — Build: KPI engine, connectors, client portal, AI narrative
- Weeks 9 and 10 — Deployment: parallel rollout to 5 pilot clients, training
- Weeks 11 and 12 — Autonomy: rollout to all 30 clients, operations manual, handoff
Pilot clients validate narrative quality before full rollout. Zero downtime, zero loss of historical data. A call with no pitch deck, just a real conversation about your operation.
Next steps
If you run a marketing agency in Colombia with 15 or more active clients and need to automate reporting with KPIs in code and AI narrative under guardrails, MAGIA Core delivers a complete platform in 12 weeks with the code in your name. For agencies with more than 50 clients or enterprise requirements (multi-country, compliance), MAGIA Forge extends the scope. Additional context at Wikipedia: Marketing automation.