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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
| Layer | What we use | Why |
|---|---|---|
| Sources | Google Ads API, Meta Marketing API, LinkedIn Marketing API, GA4 Data API | Official APIs return the same numbers as the platform UIs |
| Orchestration | n8n on a nightly schedule | Handles auth, pagination and retries; HTTP Request covers APIs without a dedicated node |
| Warehouse | BigQuery (Google Sheets for small accounts) | Cheap storage for daily rows, SQL for metrics, native Looker Studio connection |
| Metrics | SQL views | CPA and ROAS must be computed the same way every week |
| Anomaly rules | SQL thresholds against a trailing baseline | Deterministic and explainable before any AI is involved |
| Commentary | Claude Sonnet 5.5 or OpenAI’s GPT models | Turns a table of changes into a readable summary |
| Delivery | Slack, email, Looker Studio | Summary where people work, dashboard for drill-down |
How to build it
- Apply for API access first. Start developer token and app review requests on day one. They gate the whole project.
- 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.
- 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.
- Normalize and upsert. Key rows on date, platform and ad ID. Convert currencies at a fixed daily rate and store both values.
- Write the metric and anomaly views. Start with three anomaly rules, not twenty. Each rule should produce a reason string the model can quote.
- 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.
- 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