- Home
- Resources
- Integrations
- Google Analytics
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
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.
How do you connect Google Analytics to n8n?
- 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.
- 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.cloudas an authorized domain, or the domain of your own instance. - 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.
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.
| Resource | Get | Search |
|---|---|---|
| Report | ✓ | |
| User Activity | ✓ |
Operations index
Report
1 operationGet a report
report.getWhat 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, orcustom, 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.
User Activity
1 operationSearch user activity data
userActivity.searchWhat you see in n8n
Notes & use cases
Returns the activity Google Analytics recorded for one identified user, in the order it happened. Where the report answers how many, this one answers what that person actually did.
Key parameters
- View Name or ID: the view the activity is read from, chosen in the list or given as an ID like
123456through an expression. - User ID: the identifier of the user to trace, often
{{ $json.userId }}carried over from a support ticket. - Activity Types: narrows the answer to
ECOMMERCE,EVENT,GOAL,PAGEVIEWorSCREENVIEW.
Need help automating Google Analytics with n8n?
A person reads every message.
Google Analytics and n8n: common questions
01Is the Google Analytics n8n integration free?
02Which credentials do you need for the Google Analytics node?
03What are the limits of the Google Analytics node in n8n?
04Can a workflow react to Google Analytics in real time?
05n8n or Make for Google Analytics?
Get our weekly integration tips.
No spam. Unsubscribe anytime.


