> ## 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.

# Import Template From Gallery

> Imports a community template from the Google Tag Manager gallery into a workspace by its GitHub owner and repository

Imports a community template from the Google Tag Manager gallery into a workspace by its GitHub owner and repository.

|                       |                                    |
| --------------------- | ---------------------------------- |
| **App**               | Google Tag Manager                 |
| **Operation ID**      | `gtm_import_template_from_gallery` |
| **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.                                                                                                                                                                |
| `gallery_owner`           | string         | Yes      | -       | GitHub owner of the community template, e.g. gtm-templates-simo-ahava. Found in the template's gallery URL: tagmanager.google.com/gallery/#/owners/\{owner}/templates/\{repository}. |
| `gallery_repository`      | string         | Yes      | -       | GitHub repository of the community template.                                                                                                                                         |
| `gallery_sha`             | string         | No       | -       | Optional commit SHA of the template version to import. Defaults to the latest version.                                                                                               |
| `acknowledge_permissions` | boolean        | No       | -       | Set to true to acknowledge the permissions the template requests. Required for templates that need permissions.                                                                      |

## Output

**Type**: `Dict`

Returns the imported template as provided by the Tag Manager API, including its templateId.
