# Smart Tags

A **smart tag** is a `{{placeholder}}` that Sheetgo replaces with a value from
your data while an automation runs. They are used by the `document`
destination — both inside the Google Docs template and in the destination's
`file_name`.

## How a tag resolves

A tag matches a **column header** in the data reaching the destination, and is
replaced with that row's value. One document is generated per row.

| Data header | Tag to write | Result |
|---|---|---|
| `Customer` | `{{Customer}}` | `Acme Ltd` |
| `Invoice No` | `{{Invoice No}}` | `2026-0042` |

Header names are matched as they appear in your data, spaces included. There is
no mapping to configure: name the tag after the column.

## Where tags can be used

* **In the template document** (`document` destination) — anywhere in the body,
  including headers, footers and tables.
* **In `file_name`** (`document`) — so each generated document gets a distinct
  name, e.g. `"Invoice {{Invoice No}} - {{Customer}}"`.
* **In `subject` and `body`** (`share`, `mail_merge`) — the email is rendered
  per row, so each recipient sees their own values.
* **As a recipient** (`share`, `mail_merge`) — `to`, `cc`, `bcc` and `reply_to`
  accept a `"{{Header}}"` string instead of addresses, which reads the address
  from that column. The reference must be the whole value: `"{{Email}}"` works,
  `["{{Email}}"]` and `"cc: {{Email}}"` do not.

## When a tag has no matching column

`unused_fields` decides:

* `error` (default) — the run fails, so a template/data mismatch is visible.
* `ignore` — the tag is replaced with an empty string and the run continues.

## Reserved tags

| Tag | Meaning |
|---|---|
| `{{!group-start}}` … `{{!group-end}}` | Repeat the enclosed block once per row within a group, instead of generating one document per row. |
| `{{image:Column}}` | Insert the image at the URL held in `Column`. `img:`, `picture:` and `pic:` are accepted as equivalents. |

## PDF settings

The `pdf` destination has no smart tags — generated PDFs take their name from
the file they were converted from. Its `paper_size`, `page_orientation`,
`scale` and `merge_files` fields control the export. Note that `paper_size`
values for ISO sizes are **uppercase**: `A3`, `A4`, `A5`, `B4`, `B5`.


---

More: start page https://dev-api.sheetgo.com/rest/reference.md, everything in one file https://dev-api.sheetgo.com/rest/llms-full.txt, OpenAPI https://dev-api.sheetgo.com/rest/openapi.json.
