Google Analytics · Arazzo Workflow

Google Analytics Create Custom Dimension then Run Report

Version 1.0.0

Create an event-scoped custom dimension on a property, then run a report grouped by it.

1 workflow 1 source API 1 provider
View Spec View on GitHub AnalyticsDataGoogleMetricsReportingWeb AnalyticsMachine-LearningAttributionArazzoWorkflows

Provider

google-analytics

Workflows

create-custom-dimension-run-report
Register an event-scoped custom dimension and run a report grouped by it.
Creates an event-scoped custom dimension on the property, then runs a runReport request grouped by the new custom dimension using the customEvent:{parameterName} naming convention.
2 steps inputs: accessToken, description, dimensionDisplayName, endDate, parameterName, property, startDate outputs: customDimensionName, rowCount, rows
1
createCustomDimension
Create an event-scoped custom dimension on the property, tagging it against the supplied event parameter name.
2
runReport
Run a core report counting events grouped by the new event-scoped custom dimension, referenced as customEvent:{parameterName}.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Google Analytics Create Custom Dimension then Run Report
  summary: Create an event-scoped custom dimension on a property, then run a report grouped by it.
  description: >-
    A flow that spans the GA4 Admin and Data APIs to register and then exercise
    a custom dimension. The workflow creates an event-scoped custom dimension on
    a property and captures its tagging parameter name, then runs a core report
    grouped by that custom dimension. The report references the dimension using
    the documented GA4 event-scoped custom dimension naming convention,
    customEvent:{parameterName}. Each request is spelled out inline, including
    the OAuth bearer authorization.
  version: 1.0.0
sourceDescriptions:
- name: propertiesApi
  url: ../openapi/google-analytics-properties-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-custom-dimension-run-report
  summary: Register an event-scoped custom dimension and run a report grouped by it.
  description: >-
    Creates an event-scoped custom dimension on the property, then runs a
    runReport request grouped by the new custom dimension using the
    customEvent:{parameterName} naming convention.
  inputs:
    type: object
    required:
    - accessToken
    - property
    - dimensionDisplayName
    - parameterName
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 bearer access token with the analytics edit scope.
      property:
        type: string
        description: 'GA4 property resource name (e.g. properties/1234).'
      dimensionDisplayName:
        type: string
        description: Display name for the custom dimension as shown in the Analytics UI.
      parameterName:
        type: string
        description: Immutable event parameter name to tag the custom dimension against.
      description:
        type: string
        description: Optional description for the custom dimension.
        default: Created by the Arazzo create-custom-dimension-run-report workflow.
      startDate:
        type: string
        description: Inclusive report start date as YYYY-MM-DD or NdaysAgo.
        default: 28daysAgo
      endDate:
        type: string
        description: Inclusive report end date as YYYY-MM-DD, yesterday, or today.
        default: yesterday
  steps:
  - stepId: createCustomDimension
    description: >-
      Create an event-scoped custom dimension on the property, tagging it
      against the supplied event parameter name.
    operationId: analyticsadmin.properties.customDimensions.create
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: parent
      in: path
      value: $inputs.property
    requestBody:
      contentType: application/json
      payload:
        displayName: $inputs.dimensionDisplayName
        parameterName: $inputs.parameterName
        scope: EVENT
        description: $inputs.description
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      customDimensionName: $response.body#/name
      parameterName: $response.body#/parameterName
  - stepId: runReport
    description: >-
      Run a core report counting events grouped by the new event-scoped custom
      dimension, referenced as customEvent:{parameterName}.
    operationId: analyticsdata.properties.runReport
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: property
      in: path
      value: $inputs.property
    requestBody:
      contentType: application/json
      payload:
        dimensions:
        - name: customEvent:$inputs.parameterName
        metrics:
        - name: eventCount
        dateRanges:
        - startDate: $inputs.startDate
          endDate: $inputs.endDate
        limit: "100"
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      rows: $response.body#/rows
      rowCount: $response.body#/rowCount
  outputs:
    customDimensionName: $steps.createCustomDimension.outputs.customDimensionName
    rows: $steps.runReport.outputs.rows
    rowCount: $steps.runReport.outputs.rowCount

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/google-analytics-create-custom-dimension-run-report-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.