Build a Weekly Performance Report with AI Narrative — GA4 + Google Ads + HubSpot → Executive Insights Workflow with n8n

Every Monday morning, someone on your team opens GA4, exports a CSV, cross-references it against last week's Google Ads spend, then digs through HubSpot to see if the leads actually turned into pipeli

Build a Weekly Performance Report with AI Narrative — GA4 + Google Ads + HubSpot → Executive Insights Workflow with n8n

Every Monday morning, someone on your team opens GA4, exports a CSV, cross-references it against last week's Google Ads spend, then digs through HubSpot to see if the leads actually turned into pipeline. Two hours later they paste a few numbers into Slack that nobody reads carefully. By Wednesday the report is stale and the "why did conversions drop?" question is still unanswered. This workflow kills that ritual entirely: every Monday at 8AM it pulls GA4, Google Ads, and HubSpot, compares each metric to the prior week, flags every change above 15%, and writes your team a plain-English executive narrative — no dashboard, no spreadsheet, no analyst on payroll.

The problem: dashboards don't make decisions

Dashboards are where data goes to be ignored. They show you 40 metrics at once and force a human to figure out which three actually moved and whether that movement matters. For a busy founder or a two-person ops team, that cognitive tax is the real cost — not the tooling. You end up with three failure modes:

  • Nobody looks. The Looker Studio dashboard exists, but opening it is a chore, so decisions get made on gut feel.
  • The data lives in silos. GA4 knows traffic, Google Ads knows spend, HubSpot knows revenue — but no single view connects "we spent 30% more" to "CAC blew up and pipeline stayed flat."
  • Insight arrives too late. By the time an analyst manually assembles the story, the week is half over and the anomaly has compounded.

What a founder actually wants is one message: "Paid traffic is up 22% but cost-per-lead rose 18% — the new campaign is buying volume, not quality. HubSpot shows only 3 SQLs from it. Pause or fix targeting before it eats next week's budget." That's a decision, not a chart.

The solution: a scheduled data-join with an AI writer on top

The architecture is deliberately simple. n8n is the orchestrator that (1) fires on a schedule, (2) fans out to three APIs in parallel, (3) normalizes each source into a common shape, (4) computes week-over-week deltas and flags anything crossing your threshold, and (5) hands the structured deltas to an LLM that writes the narrative. The output lands in Slack, email, or both.

The critical design choice: the AI never touches raw API responses. It receives a clean, pre-computed JSON object of metrics and their percentage changes. That keeps the model cheap, fast, and accurate — it's writing prose from numbers, not doing math it can't be trusted to do. All the arithmetic (deltas, thresholds, CAC, conversion rates) happens in deterministic n8n Code and Set nodes before a single token is generated.

Step-by-step: building it in n8n

1. Trigger. Add a Schedule Trigger node. Set it to Cron with the expression 0 8 * * 1 (every Monday at 08:00). Set the node's timezone in n8n's settings so 8AM means your office's 8AM, not UTC.

2. Define the two windows. Add a Code node right after the trigger to compute date ranges. You need this week (last 7 days) and last week (the 7 days before that) so every downstream call queries both. Emit them as ISO strings:

const now = new Date();
const day = 24*60*60*1000;
const thisStart = new Date(now - 7*day).toISOString().slice(0,10);
const prevStart = new Date(now - 14*day).toISOString().slice(0,10);
return [{ json: { thisStart, prevStart, thisEnd: now.toISOString().slice(0,10) } }];

3. Pull GA4. Use the HTTP Request node against the GA4 Data API runReport endpoint (analyticsdata.googleapis.com/v1beta/properties/PROPERTY_ID:runReport), authenticated with a Google OAuth2 or service-account credential. Request metrics like sessions, conversions, and totalUsers with two date ranges in a single call — the API accepts an array of dateRanges, so week-over-week comes back in one response.

4. Pull Google Ads. Add another HTTP Request node hitting the Google Ads API searchStream endpoint with a GAQL query selecting metrics.cost_micros, metrics.clicks, and metrics.conversions segmented by date. Remember cost comes in micros — divide by 1,000,000 in the next step. Use an OAuth2 credential with your developer token in the header.

5. Pull HubSpot. Use the native HubSpot node (or an HTTP Request to the CRM Search API) to count deals and contacts created in each window. Filter deals by createdate and, if you track it, sum amount for pipeline value. The HubSpot node's built-in OAuth2 credential handles token refresh for you.

6. Merge and normalize. Feed all three branches into a Merge node (mode: Combine / by position), then a Code node that flattens everything into one flat object: { sessions_this, sessions_last, ad_spend_this, ad_spend_last, leads_this, leads_last, ... }. This is where you compute derived metrics — cost-per-lead is ad_spend_this / leads_this, conversion rate is conversions_this / sessions_this.

7. Compute deltas and flags. In the same or a following Code node, loop every metric pair and compute percentage change. Tag anything crossing your threshold:

const pct = (a,b) => b === 0 ? 0 : ((a-b)/b)*100;
const flags = [];
for (const m of metrics) {
  const change = pct(m.now, m.prev);
  if (Math.abs(change) >= 15) flags.push({ name: m.name, change: change.toFixed(1) });
}
return [{ json: { metrics, flags } }];

8. Write the narrative. Add the AI Agent node (or a Basic LLM Chain with an Anthropic Chat Model — Claude is excellent at turning structured deltas into crisp exec prose). Pass the flattened metrics and flags array in the prompt. Instruct it explicitly: "You are a CMO writing a Monday briefing. Lead with the single most important change. Explain cause when the data implies it — e.g. spend up + leads flat = quality problem. Max 200 words. No preamble." Set temperature low (0.3) for consistency.

9. Deliver. Route the AI output to a Slack node (post to #leadership) and/or a Send Email / Gmail node. Put the narrative in the body and, optionally, append the raw flags table below it for anyone who wants the numbers.

Why this beats a dashboard

  • Zero-effort consumption. The insight arrives in a channel your team already reads. Consumption rate goes from ~10% (dashboard) to ~90% (Slack message).
  • Cross-source causality. Because GA4, Ads, and HubSpot land in one object, the narrative can say "spend drove traffic but not pipeline" — a sentence no single-platform report can produce.
  • Anomalies surface themselves. The 15% threshold means you only hear about what moved. A flat week produces a short "nothing material changed" note, which is itself valuable.
  • It runs whether you're there or not. Vacation, a busy launch week — the report still lands at 8AM Monday.
  • Cheap to run. One LLM call per week over a few hundred tokens costs pennies. There's no analyst salary and no BI-tool seat.

Common pitfalls (and how to avoid them)

  • Timezone drift on the schedule. The Schedule Trigger runs in n8n's configured timezone. If your instance defaults to UTC, "8AM" fires at the wrong hour and your date windows are off by a day. Set the timezone explicitly in Settings → Timezone.
  • Division by zero. A brand-new week with zero leads makes cost-per-lead Infinity and breaks the percentage math. Guard every ratio (b === 0 ? 0 : ...) as shown above.
  • Google Ads cost in micros. Forget to divide cost_micros by 1,000,000 and your report claims you spent $45,000,000 last week. Normalize immediately after the API call.
  • Letting the AI do arithmetic. If you dump raw JSON into the prompt and ask the model to "calculate the change," it will occasionally hallucinate a number. Always pre-compute deltas in a Code node; the LLM's job is language, not math.
  • OAuth token expiry. GA4 and Google Ads tokens refresh automatically if you use n8n's OAuth2 credential type. Hard-coding a bearer token in an HTTP header works for a day, then silently 401s. Use the managed credential.
  • Threshold noise on tiny numbers. Going from 2 leads to 3 is a 50% jump but not a story. Add a minimum-volume floor (e.g. only flag if the absolute base value is above N) so small samples don't dominate the narrative.

Wire it once and you replace a recurring two-hour manual chore with a workflow that briefs your leadership team automatically, forever. The whole thing is a Schedule Trigger, three API calls, two Code nodes, an LLM node, and a Slack node — assemblable in an afternoon, or installable in minutes with the ready-made template below.

Weekly Performance Report with AI Narrative — GA4 + Google Ads + HubSpot → Executive Insights
PRONTO PARA USAR

Ja construimos isso pra voce

Nao comece do zero. O Weekly Performance Report with AI Narrative — GA4 + Google Ads + HubSpot → Executive Insights e um workflow n8n pronto para instalar — conecta suas ferramentas em minutos, sem codigo.

Instalar por $79.0 →