Claude Code for Agencies: Automate Client Reports

Agencies & Freelancers 2-3 days Intermediate

The short version

Reporting is the silent margin-killer in an agency. Every retainer client expects a recap, and most teams stitch it together by hand in Google Slides every month. With Claude Code you build a small reporting pipeline once: it pulls numbers from GA4, Meta, and Google Ads, drops them into an on-brand template, writes the plain-English summary in your voice, and exports a PDF you can send or auto-email. The build takes a couple of days. It pays itself back the first reporting cycle and every cycle after that for as long as the client stays.

Why reporting is the right thing to automate first

If you run an agency or freelance for retainer clients, look at where your unbillable hours actually go. It is rarely the strategy or the creative. It is the recurring administrative work that every client expects and none of them pay extra for: the monthly recap, the weekly check-in deck, the screenshot-and-paste ritual at the end of each campaign. A three-client roster can quietly burn a full day a month on reporting alone, and that day is pure margin you are giving away. Reporting is the perfect first automation because it is high-frequency, low-judgment, and identical in shape across clients - exactly the kind of work a Claude Code pipeline does well, and exactly the kind of work that is soul-deadening for a senior person to do by hand.

The goal is not a dashboard. Clients rarely log into dashboards, and the ones who do still want the human read on what the numbers mean. The goal is a finished artifact: a clean, on-brand PDF (or a Notion page, or an email) that opens with a two-paragraph summary in your voice, shows the four or five metrics that client actually cares about, and flags what you are doing about anything that moved the wrong way. Claude Code is good at every layer of that - calling the APIs, shaping the data, writing the narrative, and rendering the document - which is why the whole thing can be one command by the end of this build.

What you'll build

A small Node or Python project that you run with a single command like `report acme-co`. It reads a per-client config (which metrics, which date range, which accounts), fetches the data from each connected platform, computes period-over-period changes, asks Claude to write the summary and the recommendations in your agency's voice, fills an HTML template styled in the client's or your own brand, and renders it to a PDF. An optional last step emails the PDF to the client and drops a copy in their Drive folder. You own the whole thing - no per-seat reporting SaaS, no monthly fee that scales with your client count.

  • Claude Code installed and authenticated on your machine
  • Node 20+ (or Python 3.11+) and Git configured
  • Read API access to the platforms you report on (GA4, Meta, Google Ads)
  • A clients/ folder with one config file per client
  • A brand template - your fonts, colors, and logo as HTML/CSS
  • An email or Drive credential if you want the send step automated

Day one: the config-driven skeleton

Open Claude Code in an empty folder and describe the pipeline in plain English: a CLI that takes a client slug, loads clients/<slug>.json, and runs a sequence of fetch, transform, narrate, render, and send steps. Ask it to scaffold the project with a clean module per step so each platform connector is isolated. The config file is the heart of the system - it is what makes one codebase serve every client without copy-pasting. A good client config names the data sources, the metrics to pull, the comparison window (this month vs last month, this week vs the prior four-week average), the brand tokens, and the recipient. Get Claude to generate a documented example config first; that example becomes the template you clone for every new client.

Resist the urge to connect a real API on day one. Have Claude wire the whole pipeline end to end against a mock data file first - fake numbers, real shape. When `report acme-co` produces a complete PDF from fake data, you have de-risked the hard part (document rendering and layout) before fighting any API's auth flow. This is the single biggest time-saver in the build: a working skeleton on fake data means every later step is a small, testable swap rather than a debugging session with three moving parts at once.

Day two: the data connectors

Now replace the mock with real sources, one platform at a time. Start with whichever you report on most - usually GA4 via the Google Analytics Data API. Ask Claude to write the connector, handle the OAuth or service-account credential, and return a normalized object: a flat list of metric, value, and prior-value. Normalizing every source into the same shape is what keeps the rest of the pipeline simple, because the transform and narrate steps never have to know which platform a number came from. Test each connector in isolation before adding the next. When all your connectors return the same normalized shape, the transform step that computes percentage changes is a few lines and works for everything.

Build one guardrail while you are here: a sanity check that flags impossible numbers before they reach a client. A 4000% spike or a metric that dropped to zero is almost always a broken connector or a tracking gap, not real performance, and the one thing worse than a late report is a confidently wrong one. Have the pipeline surface those anomalies for your review instead of writing them up as fact.

Day three: the narrative, the template, and the send

This is where an agency report stops looking like a data dump and starts sounding like you. Feed Claude the normalized metrics plus a short voice file - three or four examples of how your agency actually talks to clients - and have it write the opening summary and the recommendations. The voice file matters more than the prompt: with two real past summaries as examples, the output reads like your account manager wrote it; without them, it reads like generic AI. Keep the model on a tight leash here - it should explain and contextualize the numbers it was given, never invent metrics or promise results. A good instruction is: summarize only the provided data, name the single biggest win and the single biggest concern, and propose one concrete next action.

For the document itself, render an HTML template to PDF with a headless browser (Puppeteer or Playwright). HTML and CSS give you full control of the brand - your fonts, your color system, the client's logo - and Claude can build the template to match a screenshot of how you want it to look. The send step is the easy finale: email the PDF through your transactional provider and copy it to the client's shared Drive folder. Once that runs clean, the entire monthly ritual is one command, and adding a new client is copying a config file and dropping in their credentials.

Choices to make along the way

Node versus Python: pick whichever your team already reads. Node pairs naturally with Puppeteer for PDF rendering; Python has cleaner data-wrangling with pandas if your reports are heavy on tables. Either works. PDF versus a live page: a PDF is the safe default because clients forward it, print it, and file it - but if your clients are technical, a password-protected Notion or web page lets them click into detail. Per-client brand versus your house brand: white-labeling each report in the client's brand reads as more premium and is worth the extra template work for higher-tier retainers. Run on a schedule versus on demand: start on demand (`report acme-co` when you are ready) and only add a cron or GitHub Action once you trust the output enough to send it without reading every line.

What this is worth to the agency

The hard return is the recovered hours - the day a month per few clients that goes back into billable work or into selling. The softer return is bigger: reports go out on time, every time, in a consistent format that makes the agency look like it has its act together, and the work no longer depends on one person remembering to do it. As you add clients, reporting cost stays flat instead of scaling linearly, which is exactly the leverage that lets a small team carry a roster that used to need a hire. That is the whole agency thesis behind Claude Code - the recurring, undifferentiated work becomes software you own, and your people go back to the judgment work clients actually pay a premium for.

Common questions

  • Do I need to be a developer to build this?

    You need to be comfortable reading code and following along, not writing it from scratch. Claude Code writes the connectors, the transforms, and the template; your job is to describe what you want, review each step, and catch when a number looks wrong. If you can read a JSON config and follow a stack trace enough to know which step failed, you can build this.

  • Will the client-facing summary sound like generic AI?

    Only if you skip the voice file. The single most important input is two or three examples of how your agency actually writes to clients. With those as examples, the summary reads like your account manager wrote it. Keep the model constrained to the data it was given so it explains the numbers rather than inventing them.

  • Is it safe to give an AI tool access to my clients' analytics accounts?

    The pipeline uses the same read-only API credentials any reporting tool would, stored per client in your own environment and never committed to code. Claude Code runs locally on your machine and only reads what your connectors request. You are not handing account access to a third-party SaaS - you own the whole pipeline.

  • How is this different from a reporting SaaS like a dashboard product?

    Dashboards charge per seat or per client and still leave you writing the human summary by hand. This pipeline is a one-time build you own outright: cost stays flat as you add clients, the output is a finished branded artifact instead of a login link, and the narrative is written in your voice automatically. The trade-off is you maintain it - which for most agencies is far cheaper than a per-client subscription at scale.

Keep going

Build it. Ship it. Get paid.

Step-by-step lessons for builds like this inside the club. Join Claude Code Club for $9/month.