Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions84

Overview

This node integrates with the Google Analytics API, specifically targeting the Admin (V1Alpha) resource for Account Access Bindings. The "Create Account Access Binding" operation allows users to create an access binding for a Google Analytics account. This is useful for managing user permissions and access controls within Google Analytics accounts.

Typical use cases include:

  • Automating the assignment of user roles or permissions on Google Analytics accounts.
  • Managing access bindings programmatically as part of a larger workflow for account administration.
  • Integrating Google Analytics account access management into broader IT or marketing automation processes.

For example, a marketing team could automate granting access to new analysts by creating access bindings via this node whenever a new user is onboarded.

Properties

Name Meaning
Account ID The unique identifier of the Google Analytics account where the access binding will be created.
Query Parameters Optional parameters to customize the request, including:
- Calculated Metric ID: ID for a calculated metric
- 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
- Page Token: Token for fetching next page of results
- Show Deleted: Whether to include soft-deleted properties
- 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 containing the details of the access binding to create. This typically includes the user or group to bind and their role/permissions.

Output

The node outputs a JSON array where each element corresponds to the response from the Google Analytics API for the create access binding request. The structure of each JSON object matches the API's response schema for an access binding resource, which generally includes:

  • The unique identifier of the created access binding.
  • Details about the user or group granted access.
  • The role or permission level assigned.
  • Metadata such as creation timestamps.

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 Admin API endpoint https://analyticsadmin.googleapis.com/v1alpha.
  • Proper permissions on the Google Analytics account are necessary to create access bindings.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that OAuth2 credentials for Google Analytics are properly set up in n8n.
  • Required Parameter Errors: Errors like "Account ID is required" indicate missing mandatory input parameters. Verify that all required fields are provided.
  • API Errors: Errors returned from the Google Analytics API will be wrapped and shown with the message prefix "Error calling Google Analytics API." Check the error details for issues such as insufficient permissions, invalid IDs, or malformed request bodies.
  • JSON Parsing Issues: Ensure that the JSON provided in the Request Body property is valid JSON syntax.

Links and References


This summary focuses on the "Create Account Access Binding" operation under the Admin (V1Alpha) - Account Access Binding resource, describing its purpose, inputs, outputs, dependencies, and common troubleshooting points based on static analysis of the node implementation.

Discussion