Marketing

How to automate ad performance reporting with AI

The short answer

To automate ad performance reporting with AI, pull daily campaign data from Google Ads, Meta Ads, LinkedIn Ads and GA4 through their APIs into one normalized table, compute spend, CPA, ROAS and week-over-week change in SQL, and have an LLM write short commentary on the largest changes using only those computed figures. Delivered weekly to Slack or email with a Looker Studio dashboard behind it, a first version typically takes two to four weeks.

What this automation does

Every Monday the team gets one report that covers every paid channel, with the same definitions, and a short note on what actually moved.

  1. Extract. Each night, n8n pulls the last 30 days of campaign, ad set and ad-level metrics from Google Ads, Meta Ads and LinkedIn Ads, plus sessions and conversions by source from GA4.
  2. Normalize. Each platform’s fields are mapped to one schema: date, platform, account, campaign, ad group, spend, impressions, clicks, platform conversions, conversion value. Rows are upserted, so restated days overwrite older values.
  3. Compute. SQL views calculate CPC, CTR, CPA, ROAS and week-over-week change at each level, and compare platform-reported conversions with GA4 conversions for the same source.
  4. Detect anomalies. Simple statistical rules flag campaigns whose spend or CPA moved far outside their recent range, campaigns spending with zero conversions, and budgets pacing to overspend.
  5. Write commentary. The flagged rows and headline totals go to an LLM, which writes a short summary for the marketing lead: what changed, where, and which checks to run. It uses only numbers from the payload.
  6. Deliver. The summary posts to Slack and email with a link to a Looker Studio dashboard built on the same tables.

When it is worth building

The usual trigger is a performance marketer spending three or more hours a week exporting from each platform, pasting into a spreadsheet and writing the same kind of summary. Another is a founder who sees spend climbing but cannot get a straight answer on cost per customer across channels.

If you spend on a single platform, its own reporting plus a scheduled email is enough. If you are an agency reporting to many clients, the client-facing version has different needs (white-label output, per-client narratives) covered in marketing agency client reporting. And if you already pay for a marketing data connector that lands data in a warehouse, skip the extraction layer and build only the computation and commentary.

Architecture

LayerWhat we useWhy
SourcesGoogle Ads API, Meta Marketing API, LinkedIn Marketing API, GA4 Data APIOfficial APIs return the same numbers as the platform UIs
Orchestrationn8n on a nightly scheduleHandles auth, pagination and retries; HTTP Request covers APIs without a dedicated node
WarehouseBigQuery (Google Sheets for small accounts)Cheap storage for daily rows, SQL for metrics, native Looker Studio connection
MetricsSQL viewsCPA and ROAS must be computed the same way every week
Anomaly rulesSQL thresholds against a trailing baselineDeterministic and explainable before any AI is involved
CommentaryClaude Sonnet 5.5 or OpenAI’s GPT modelsTurns a table of changes into a readable summary
DeliverySlack, email, Looker StudioSummary where people work, dashboard for drill-down

How to build it

  1. Apply for API access first. Start developer token and app review requests on day one. They gate the whole project.
  2. Agree on definitions. Which conversion counts as a result per platform, which currency, which time zone, and which attribution model you will report. Write it at the top of the dashboard.
  3. Build one extractor per platform. Pull a trailing 30-day window daily so restated conversions are captured. Store the raw response alongside the normalized rows.
  4. Normalize and upsert. Key rows on date, platform and ad ID. Convert currencies at a fixed daily rate and store both values.
  5. Write the metric and anomaly views. Start with three anomaly rules, not twenty. Each rule should produce a reason string the model can quote.
  6. Prompt for commentary. Provide the totals, flagged rows with reasons, and strict rules: no invented numbers, no causal claims beyond the data, end with three suggested checks.
  7. Validate before posting. Confirm platform spend in the warehouse matches the platform UI within a small tolerance for the prior week. If not, post a data warning instead of the summary.

The downloadable starter template below covers the Google Ads and Meta extraction, BigQuery upsert and the Slack summary.

What breaks in production

  • API version retirements. Ad platform APIs are versioned and old versions are retired on a schedule. Track deprecation notices and budget a small update a few times a year.
  • Attribution mismatch. Platform conversions will not match GA4 or your CRM. Show both rather than picking one silently, or the report loses trust the first time someone checks.
  • Account time zones. Each ad account reports in its own time zone. A Pacific account and an Eastern account produce different days. Normalize or label clearly.
  • Renamed campaigns. Marketers rename campaigns mid-flight. Key on IDs and keep names as labels only.
  • Expired tokens. Personal OAuth tokens break when the person who connected them leaves. Use a shared service account or business-level connection where the platform allows it.

Timeline and cost

A three-platform build with GA4, a BigQuery warehouse, a Looker Studio dashboard and weekly AI commentary usually takes two to four weeks, plus API approval time. Lumeor builds this in the range of $5,000 to $12,000, depending on the number of platforms and accounts, the level of detail (campaign versus ad), and whether you need CRM revenue joined in. Warehouse and model costs for a typical small advertiser are low; most of the ongoing work is keeping up with API changes. The same snapshot-and-narrate pattern is used for sales pipeline reporting.

How to measure success

  • Hours per week spent building reports, before and after
  • Difference between warehouse spend and platform UI spend, kept within tolerance
  • Days from an anomaly starting to someone acting on it
  • Wasted spend caught by zero-conversion and overspend alerts
  • Share of weekly reports sent on time without a data warning

Free starter template

Import a working n8n workflow that implements the core of this guide, then adapt it to your systems.

Frequently asked questions

Why not just use the dashboards inside each ad platform?

Each platform reports its own conversions with its own attribution rules, so totals across platforms rarely add up to what your CRM or analytics shows. A combined report puts all platforms in one table with one definition of spend and results, and shows platform-reported and analytics-reported conversions side by side so you can see the gap.

Do I need API approval from the ad platforms?

Usually. The Google Ads API requires a developer token, and calling live accounts means applying for a higher access level that Google reviews (as of 2026, Basic access also requires brand verification of your Google Cloud project). LinkedIn's marketing APIs require an approved developer application. Meta's Marketing API requires an app with the right permissions. Plan for some setup time, or use a data connector service that already holds these approvals.

Can the AI tell me why performance changed?

It can point to where the change happened, such as which campaign, platform, audience or creative drove the swing, because that is in the data. It should not claim causes it cannot see, such as a competitor's promotion. The prompt instructs it to separate observed changes from suggested checks.

Why do last week's numbers change after the report is sent?

Platforms keep attributing conversions to past clicks and views for days or weeks afterwards, depending on the attribution window. The pipeline re-pulls a trailing window every night, and the report labels recent days as still settling.

Should this go in BigQuery or a spreadsheet?

For one or two platforms and a few campaigns, Google Sheets is fine. Once you have several platforms, daily ad-level data and more than a few months of history, a warehouse such as BigQuery is faster, cheaper to query and easier to connect to Looker Studio.

Next steps