> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Trigger

> Creates a trigger in a Google Tag Manager workspace from a raw Trigger resource payload

Creates a trigger in a Google Tag Manager workspace from a raw Trigger resource payload. Its trigger ID goes into the firingTriggerId of gtm\_create\_tag; version and publish to take it live.

|                       |                       |
| --------------------- | --------------------- |
| **App**               | Google Tag Manager    |
| **Operation ID**      | `gtm_create_trigger`  |
| **Type**              | Action                |
| **Connection**        | `gtm` (required)      |
| **Credits per run**   | 1                     |
| **Agent / MCP tool**  | Yes                   |
| **Requires approval** | Yes (write operation) |

## Inputs

| 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `trigger_payload` | object or string | Yes      | -       | Full Trigger resource (object or JSON string) matching the Google Tag Manager API v2 Trigger spec. Must include name and type (e.g. pageview, customEvent, click, linkClick, formSubmission); other fields like customEventFilter, filter, and waitForTags follow the spec. You can copy a trigger from gtm\_list\_triggers and edit it (read-only fields are stripped automatically). Example custom event trigger: \{"name": "CE - purchase", "type": "customEvent", "customEventFilter": \[\{"type": "equals", "parameter": \[\{"type": "template", "key": "arg0", "value": "\{\{\_event}}"}, \{"type": "template", "key": "arg1", "value": "purchase"}]}]} |

## Output

**Type**: `Dict`

Returns the created trigger as provided by the Tag Manager API, including its triggerId.
