How to Connect n8n to Google Analytics 4: Automate Reporting (2025)

Google Analytics 4 holds the numbers your business runs on — sessions, conversions, revenue, channels — but logging in to check them is a chore nobody keeps up. Connecting n8n to the GA4 Data API lets you pull those metrics on a schedule and push them wherever your team actually looks: Slack, email, a spreadsheet, or an AI-written executive summary.

This guide covers the service-account setup, running your first GA4 report, and turning raw metrics into an automated narrative.

Why automate GA4 reporting

GA4's interface is powerful but slow to navigate, and it doesn't push insights to you. With n8n you can:

  • Send a daily traffic-and-conversion snapshot to Slack every morning.
  • Build a weekly executive report combining GA4 with Google Ads and CRM data.
  • Alert the team when conversions or revenue drop below a threshold.
  • Feed metrics into an AI node that writes a plain-English narrative of what changed and why.

Step 1 — Enable the GA4 Data API and create a service account

  1. In Google Cloud Console, enable the Google Analytics Data API.
  2. Create a service account and generate a JSON key file.
  3. Copy the service account email (ends in .iam.gserviceaccount.com).
  4. In GA4 Admin → Property Access Management, add that email with Viewer access.

The service account is what lets automation read your property without a human login — this is the same pattern n8n's own reporting uses.

Step 2 — Add the Google credential in n8n

Open Credentials → New → Google Analytics OAuth2 API for interactive access, or use the Service Account credential type and paste the JSON key for unattended automation. Service accounts are the right choice for scheduled reports because there's no token to re-authorize. Save and test the connection.

🚀 Get a written report, not just numbers

This workflow pulls GA4, Google Ads, and HubSpot data and has AI write the executive narrative — exactly the Step 4 pattern, delivered to your inbox every week.

Get the Weekly Performance Report with AI Narrative template →

Step 3 — Run your first GA4 report

Add the Google Analytics node, select your GA4 property, and choose Get Report. Define your metrics (e.g. sessions, conversions, totalRevenue) and dimensions (e.g. sessionDefaultChannelGroup, date), plus a date range like last 7 days. Execute, and the node returns structured rows you can format, chart, or hand to an AI step.

Keep an eye on GA4's data-freshness window — very recent data can still be processing.

Step 4 — Turn metrics into an AI narrative

Raw numbers don't drive decisions — interpretation does. Pipe the GA4 rows into an AI node with a prompt like "Summarize week-over-week changes in traffic, conversions, and revenue, and flag anything unusual." The result is a ready-to-send executive summary. Deliver it via email or Slack on a Monday-morning schedule, and leadership gets insight without ever opening a dashboard.

Troubleshooting

  • PermissionDenied — the service account email isn't added as a Viewer on the GA4 property.
  • Empty report — check the date range and that the metric/dimension names are valid GA4 API identifiers (not UI labels).
  • Quota errors — the Data API has per-property limits; batch requests and cache results.
  • Numbers don't match the UI — sampling or a different attribution model; align date ranges and definitions.

Reporting that runs itself

Once the service-account credential is wired up, GA4 becomes a data source n8n can query on any schedule. The winning move is to go beyond raw metrics — let an AI step interpret the numbers and deliver a narrative your team will actually read.

Start with a single automated weekly summary, confirm the numbers match your dashboard, then layer in alerts and multi-source reports.


Ready to automate? Get this n8n template on Gumroad

Get the Weekly Performance Report workflow — GA4, Google Ads, and HubSpot combined into an AI-written executive summary.

Get the template on Gumroad →