Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Data (V1Alpha) - Report Task → Create Report Task

AI-generated

Overview

This node integrates with the Google Analytics API, specifically supporting a wide range of administrative and data-related operations across different versions (V1Alpha, V1Beta) and resource types. For the Data (V1Alpha) - Report Task resource with the Create Report Task operation, it allows users to create report tasks within a specified Google Analytics property.

Creating report tasks is useful for scheduling or managing analytics reports programmatically, enabling automation of data retrieval and processing workflows. For example, a marketing analyst could automate the generation of custom reports on user engagement metrics without manual intervention.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property where the report task will be created.
Query Parameters Optional parameters to refine or control the request, including:
- Calculated Metric ID: ID for a calculated metric to use.
- Entity: Level of data access report (property or account level).
- 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 (in snake case).
Request Body JSON object representing the body of the report task creation request.

Output

The node outputs an array of JSON objects representing the response from the Google Analytics API after creating the report task. The structure corresponds directly to the API's response schema for report tasks, typically including details such as:

  • The unique ID of the created report task.
  • Status and metadata about the report task.
  • Configuration details of the report task.

No binary data output is involved in this operation.

Dependencies

  • Requires valid Google Analytics API OAuth2 credentials configured in n8n.
  • The node uses the Google Analytics Data API endpoints:
    • Base URL for Data (V1Alpha): https://analyticsdata.googleapis.com/v1alpha
  • Proper permissions on the Google Analytics property are necessary to create report tasks.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that OAuth2 credentials for Google Analytics are properly set up and authorized.
  • Required Parameter Errors: Errors like "Property ID is required" indicate missing mandatory input; verify all required fields are provided.
  • API Request Failures: Network issues or insufficient permissions can cause API call failures. Check API quotas, permissions, and network connectivity.
  • Invalid JSON in Request Body: Ensure the JSON provided in the Request Body field is well-formed and matches the expected schema for creating report tasks.

Links and References

Discussion