Google Analytics Action

Queries Google Analytics 4 from a flow. Two operations — a report over a date range, and the realtime view — both returning rows you can feed to a Sheets node, a Slack summary, or an AI Node that writes the weekly commentary for you. Or switch it to AI toolkit mode and let the agent ask its own questions.

Setup

A Google credential with the analytics scope, plus the GA4 property you are querying. The property id is the numeric one from GA4's admin screen, not the measurement id that starts with G-.

The GA4 Property list shows every property the connected Google account can read. If it says No GA4 properties on this account, that account has no access to any. Create one in Google Analytics (Admin → Create → Account, or Property if you already have an account), or have its owner add that Google account under Admin → Property → Access management → + → Add users, with at least the Viewer role. Then press Refresh.


Operations

The Operation dropdown decides what the node does and which fields appear under it. These are the exact values the API validates against:

ValueIn the dropdownWhat it does
runReportRun reportMetrics over a date range, broken down by dimensions.
runRealtimeReportRun realtime reportWhat is happening right now — the last 5, 15 or 30 minutes.

Dates take YYYY-MM-DD or a relative value: today, yesterday, NdaysAgo. The property, dates and filter value accept {{payload.x}}, so the node before can choose them.


Realtime reports

Realtime has its own, much shorter list of fields, so the metrics and dimensions pickers only offer these when Run realtime report is selected. Switching to it removes anything it doesn't support and tells you what went; a field saved before that isn't supported shows in red.

  • Metrics: activeUsers, eventCount, keyEvents, screenPageViews.
  • Dimensions: country, city, deviceCategory, platform, unifiedScreenName, eventName, minutesAgo, appVersion, the audience and stream ones, and your user-scoped custom dimensions (customUser:…). There is no date or pagePath.

Google's full list: Realtime API dimensions and metrics.


Filter and sort

  • Filter by dimension takes one dimension, a match (exactly, contains, begins with, ends with, regex) and a value. For AND / OR / NOT across several, use the raw filter in Advanced; when it is set, it wins and the simple filter is ignored.
  • Sort by is picked from the metrics and dimensions the report asks for — the API can't sort by anything else. Empty keeps the API's order.

What it returns

One object per row, named after its dimensions and metrics, with metrics as numbers: {{payload.rows.0.activeUsers}} in the next node. The output is iterable on rows, so a node connected after it runs once per row without a Loop.

{
  "rows": [
    { "date": "20260924", "country": "Mexico", "activeUsers": 412, "sessions": 530 }
  ],
  "rowCount": 1500,
  "property": "properties/123456789",
  "operation": "runReport"
}

rowCount is how many rows the report has in GA, not how many came back: with the default limit of 100 it can say 1500. Use Row offset in Advanced to page through the rest.


AI toolkit mode

Once a credential is picked, the node asks for a Mode. Single operation is everything above: one report, your templates, every run. AI toolkit turns the node into four tools that an AI Node — or an MCP client, through one of your MCP servers — calls by name. The model picks the metrics, dimensions, dates, filter, sort and limit on each call, so one node answers any question about your traffic.

ToolDoesArguments
run_reportA report over a date range — the Run report operation, with every optionproperty_id · metrics · dimensions? · start_date? · end_date? · filter_dimension? · filter_match_type? · filter_value? · dimension_filter_json? · order_by? · order_desc? · limit? · offset? · keep_empty_rows?
run_realtime_reportThe last 1 to 30 minutes — the Run realtime report operationproperty_id · metrics · dimensions? · minutes? · filter_dimension? · filter_match_type? · filter_value? · dimension_filter_json? · order_by? · order_desc? · limit?
list_propertiesThe GA4 properties the connected account can read, with their ids—
list_fieldsThe metrics and dimensions of a property, custom ones included; filter by kind, text, or realtime onlyproperty_id? · kind? · search? · realtime?

The two report tools run the same code as the operations above, so everything in Realtime reports and Filter and sort applies. metrics, dimensions and the other lists go comma-separated; minutes is how far back realtime looks, from 1 to 30.

The default property

Pick a Default property in toolkit mode and every tool uses it unless the user asks about another one — the model sees that the property is already set and leaves property_id out, like the default channel of the Slack toolkit. Left empty, the node falls back to the property of its Single operation config; with neither, the model has to name one and can call list_properties to find it. It has to be a real id: a template can't be resolved, because the model's calls don't carry the flow's payload.

What the model gets, and what it can't do

  • 50 rows per report unless the model asks for more with limit — every row lands in its context.
  • Realtime is checked before Google is called. Ask for sessions or date in realtime and the tool answers which fields aren't available, instead of Google's bare 400.
  • Arguments are used as written. A {{payload.x}} the model writes is not resolved, so it can't read the output of other nodes in the flow.
  • Everything is read-only: no tool can change anything in Google Analytics.

Testing a tool

⚠Only a tool call picks the tool. In AI toolkit mode, only an AI Node, an MCP client or a voice agent chooses which tool the node runs. Run Test, a flow or a webhook run the operation saved on the node: an operation in their payload that names another tool is refused.
✦To try a tool, call it from an AI Node or from an MCP client. Its arguments look like this:
jsonA tool call
{ "operation": "run_report", "metrics": "activeUsers,sessions", "dimensions": "country", "start_date": "7daysAgo", "end_date": "yesterday" }

Any tool can be blocked on the node with its switch under Block these tool calls: it disappears from every AI Node and MCP server that uses the node, and the node refuses it if a call arrives anyway.

⚠A node in toolkit mode is not part of the pipeline. Events arriving through connections made before you switched are refused — the node only runs the tool it is asked for.

As one tool, in Single operation

Without the toolkit, the AI Node's tool picker still lists the node as Analytics: one tool that runs the report as you configured it, where the {{payload.x}} fields become its parameters — put {{payload.country}} in the filter value and the agent fills it when someone asks for one country. Use it when the report is fixed and only a value changes; use the toolkit when the agent should decide what to ask.


Gotchas

  • Metrics and dimensions have to be compatible. GA4 rejects combinations it cannot compute, and the error names the offending pair — it is not a permissions problem.
  • Recent data still moves. GA4 keeps refining the last ~48 hours, so a window ending today can change between two runs.
  • Sampling and thresholding are GA4's, not ours: low-traffic segments can come back empty for privacy reasons rather than because there is no data.
  • Quota. A property has a daily token quota; when it runs out GA4 answers 429, the node retries twice and then fails with Google's message until the quota resets.