Resources · n8n integration

Google Analytics n8n integrationAutomate Google Analytics with n8n.

The Google Analytics n8n integration turns a recurring reporting question into a workflow that answers it by itself. The node carries 2 operations across 2 resources: one returns a report for a property, the other returns what a single user did. No trigger ships with it, so a schedule or an inbound call starts the run.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the Google Analytics n8n integration cover?

The Google Analytics node reads data out of a property and hands it to the rest of a workflow. It ships with n8n, on Cloud and on a self-hosted instance, and exposes 2 operations across 2 resources. report.get returns analytics data for a property over a date range you choose. userActivity.search returns the activity recorded for one user ID inside a view.

The first job most builders wire up is the Monday morning number. A schedule fires, the node asks for the last7days range with sessions and page views split by landing page, and the rows land in Google Sheets as a tab that grows week after week. Nobody opens the Analytics interface to copy a table again.

The second job is the alert. Same report, but a comparison step sits after the node and only lets the workflow continue when traffic on a key page drops. Then Slack gets the message, with the figure and the dimension that moved, instead of a dashboard nobody checks.

The third job is narrower and often forgotten. Support receives a complaint about a broken checkout, and userActivity.search replays what that user ID actually did: pageviews, events, ecommerce steps. The answer goes back out through Gmail in the same run, attached to the ticket.

Reach for the HTTP Request node when the API has something this node does not expose. Only reports and user activity are covered here, so anything else on the Google Analytics API goes through HTTP Request, which reuses the same Google credential through predefined authentication. Metrics that need long-term storage are usually better pushed into a database and drawn in Grafana.

Two limits are worth knowing before building. A report request accepts up to 10 metrics and up to 9 dimensions, so a very wide table has to be split into several calls. And the Property Type field still offers Universal Analytics, an older version that is not fully functional after the end of June 2023, which makes Google Analytics 4 the sane default. If you are still weighing platforms, the n8n review goes into the trade-offs.

Connect

How do you connect Google Analytics to n8n?

  1. 01

    Open the credential in n8n

    A credential is the saved connection n8n uses to talk to Google. Create it once from the Credentials menu and every workflow can pick it from the node dropdown. On n8n Cloud, Managed OAuth2 is available for Google nodes: click Sign in with Google on the credentials screen and nothing else is needed in the Google Cloud Console.

  2. 02

    Build the OAuth client in Google Cloud

    Self-hosted instances go through Custom OAuth2 instead. Create a Google Cloud Console project, enable the APIs you need, then configure the OAuth consent screen with an App name, a User support email and an Audience set to Internal or External. Under Branding, add n8n.cloud as an authorized domain, or the domain of your own instance.

  3. 03

    Paste the keys back into n8n

    In APIs & Services > Credentials, create an OAuth client ID of application type Web application, copy the OAuth Redirect URL shown in your n8n credential and paste it into Authorized redirect URIs. The generated Client ID and Client Secret go back into the n8n credential, and the connection is live.

Actions

What can the Google Analytics node do?

The Google Analytics node exposes 2 operations across 2 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.

Resources × operations matrix
ResourceGetSearch
Report
User Activity

Report

1 operation
01

Get a report

report.get

What you see in n8n

Notes & use cases

Returns the analytics data for one property over a chosen period, as rows ready to push into a sheet, a message or a database.

Key parameters

  • Property: the Google Analytics property the report reads from, picked in the list or set with an expression such as {{ $json.propertyId }}.
  • Date Range: last7days, last30days, today, yesterday, lastCalendarWeek, lastCalendarMonth, or custom, which turns on Start and End.
  • Metrics and Dimensions to split by: up to 10 metrics such as sessions or page views, up to 9 dimensions such as city.
  • Return All: on, n8n walks every page of results; off, Limit caps the rows.
Use cases
a weekly traffic table sent to the marketing channel, or a nightly export of conversions per landing page.

User Activity

1 operation
Need help

Need help automating Google Analytics with n8n?

A person reads every message.

FAQ

Google Analytics and n8n: common questions

01Is the Google Analytics n8n integration free?
Yes, on the n8n side. The Google Analytics node ships with n8n, so there is nothing to install and no add-on to buy, whether you run n8n Cloud or a self-hosted instance under the Community Edition and its Sustainable Use licence. The Google credential is created once from the Credentials menu and reused by every workflow that needs it, including the HTTP Request calls you add later. What Google itself charges for an Analytics property is a separate question that this page does not cover.
02Which credentials do you need for the Google Analytics node?
A Google credential, set up in one of two ways. On n8n Cloud, Managed OAuth2 is offered for Google nodes: you click Sign in with Google and no Cloud Console setup is required. Self-hosted instances build a Custom OAuth2 credential instead, which means a Google Cloud Console project, the APIs enabled, an OAuth consent screen, then an OAuth client ID of type Web application whose Authorized redirect URIs contain the redirect URL shown in n8n. Google service nodes also document Service Account authentication, using the Service Account Email and Private Key from the downloaded JSON file, but OAuth2 is the easier route for most setups.
03What are the limits of the Google Analytics node in n8n?
It reads, it does not write. The node covers 2 operations across 2 resources, reports and user activity, and nothing else on the Google Analytics API. A single report request accepts up to 10 metrics and up to 9 dimensions, so a very wide table needs several calls stitched back together in the workflow. Universal Analytics still appears in the Property Type field, but it is an older version that is not fully functional after the end of June 2023. For anything the node does not expose, the HTTP Request node hits the endpoint directly while reusing the same credential.
04Can a workflow react to Google Analytics in real time?
No, and the reason is structural: no Google Analytics trigger node ships with n8n. A workflow around this tool starts with something else. The Schedule Trigger is the usual answer, firing at a fixed interval so the report runs every morning or every hour. An n8n Webhook, meaning a URL a third-party service calls, works when another system decides the moment. The trigger of another tool works too, for instance a new row somewhere that should be enriched with traffic data before it moves on.
05n8n or Make for Google Analytics?
It depends on four things, and price alone is not one of them. Hosting comes first: n8n runs on your own server through Docker or npm, or on n8n Cloud, while Make is hosted only. Data control follows from that, since a self-hosted run keeps the analytics rows inside your own perimeter. The cost model differs too, because Make bills per operation, which a daily report multiplied by many properties can inflate quickly. Last comes visual logic, and that one is a matter of habit more than capability.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.