Inputs
Output
Type:Dict
Returns the created transformation as provided by the Tag Manager API.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Creates a transformation in a Google Tag Manager workspace from a raw resource payload
| App | Google Tag Manager |
| Operation ID | gtm_create_transformation |
| Type | Action |
| Connection | gtm (required) |
| Credits per run | 1 |
| Agent / MCP tool | Yes |
| Requires approval | Yes (write operation) |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
account | DynamicAccount | Yes | - | Select the Google Tag Manager account. |
container | DynamicAccount | Yes | - | Select the container. |
workspace | DynamicAccount | Yes | - | Select the workspace. |
transformation_payload | object or string | Yes | - | Full Transformation resource (object or JSON string) matching the Google Tag Manager API v2 Transformation spec (server containers only). Must include name and type. Google does not publish the type values: they are tf_exclude_params (Exclude parameters), tf_allow_params (Allow parameters) and tf_augment_event (Augment event); any other type is answered with a bare internal error rather than a validation message. The settings go in parameter as a list of map rows. Exclude example: {“name”: “Exclude FB user data”, “type”: “tf_exclude_params”, “parameter”: [{“type”: “list”, “key”: “excludedParamsTable”, “list”: [{“type”: “map”, “map”: [{“type”: “template”, “key”: “excludedParams”, “value”: “x-fb-ud-em”}]}, {“type”: “map”, “map”: [{“type”: “template”, “key”: “excludedParams”, “value”: “x-fb-ud-ph”}]}]}]}. Allow parameters uses allowedParamsTable with column allowedParams; Augment event uses augmentEventTable. With only the table given, the transformation applies to all tags with no matching conditions. To scope it to specific tags or add matching conditions, copy those parameters (affectedTags, affectedTagTypes, allTagsExcept, matchingConditionsEnabled, booleanExpressionString) from a transformation configured that way in the Tag Manager interface via gtm_list_transformations; a tag reference written by hand is rejected as invalid. Read-only fields are stripped automatically. |
Dict
Returns the created transformation as provided by the Tag Manager API.