Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Data (V1Beta) - Audience Export → Query Audience Export

AI-generated

Overview

This node integrates with the Google Analytics API, specifically supporting a wide range of administrative and data-related operations across different API versions (v1alpha, v1beta) and resources. For the Data (V1Beta) - Audience Export resource, the node allows querying audience export data within a specified property.

Use cases include:

  • Retrieving detailed audience export information for analysis or reporting.
  • Automating workflows that require access to audience export data from Google Analytics.
  • Integrating audience export queries into broader data pipelines or marketing automation processes.

For example, a marketer might use this node to programmatically query audience exports to update CRM segments or trigger targeted campaigns based on audience data.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property where the audience export resides.
Audience Export ID The unique identifier of the specific audience export to query.
Query Parameters Optional parameters to refine the query, including:
- Calculated Metric ID: ID for a calculated metric to use.
- Entity: Level of data access report (property or account).
- Filter: Expression to filter results.
- Names: Names of access bindings to retrieve.
- Page Size: Maximum number of report tasks to return (default 10).
- Page Token: Token for fetching next page of results.
- Show Deleted: Whether to include soft-deleted properties (default true).
- Universal Analytics Property ID: UA property to look up connected GA4 property.
- Update Mask: List of fields to update (snake case).
Request Body JSON object for request body payload if required by the operation (usually empty for query).

Output

The node outputs an array of JSON objects representing the response from the Google Analytics API for the queried audience export. The structure corresponds directly to the API's response schema for audience exports, typically including details such as export metadata, status, and data content.

No binary data output is indicated for this operation.

Dependencies

  • Requires valid Google Analytics API credentials with OAuth2 authentication.
  • The node uses the googleAnalyticsOAuth2Api credential to authenticate requests.
  • Network access to Google Analytics API endpoints (analyticsdata.googleapis.com and analyticsadmin.googleapis.com) is necessary.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that OAuth2 credentials are configured correctly in n8n.
  • Required Parameter Errors: The node validates required IDs (e.g., Property ID, Audience Export ID). Missing these will cause errors like "Property ID is required" or "Audience Export ID is required." Provide all mandatory inputs.
  • API Request Failures: Errors returned from the Google Analytics API are wrapped and shown with the message prefix "Error calling Google Analytics API." Check the error details for issues such as permission problems, invalid IDs, or quota limits.
  • Pagination Issues: When using query parameters like pageToken, ensure tokens are valid and used correctly to paginate through large result sets.

Links and References


This summary focuses on the Data (V1Beta) - Audience Export resource and the Query Audience Export operation as requested.

Discussion