# DestinationMailMerge

Send one personalized email per row, rendered from `body`.

Type: object

Fields typed as another model are documented on that model's page; fetch it before filling the field.

| Field | Type | Required | Description | Allowed values / default / constraints |
| --- | --- | --- | --- | --- |
| `type` | string | yes | Sends one personalized email per row (**mail merge**). | const: `"mail_merge"` |
| `subject` | string | yes | Email subject. Supports {{Column}} smart tags. |  |
| `body` | string | yes | Email body template as plain text. Each line becomes one paragraph. {{Column}} smart tags are replaced per row. |  |
| `to` | array of string (email) or string | yes | Recipients: a list of addresses, one address, or a "{{Header}}" reference to read the address from a column. |  |
| `cc` | array of string (email) or string, nullable | no | Cc recipients. Same forms as `to`. |  |
| `bcc` | array of string (email) or string, nullable | no | Bcc recipients. Same forms as `to`. |  |
| `reply_to` | string, nullable | no | Reply-To: one address, or a "{{Header}}" reference. |  |
| `use_plain_text` | boolean | no | Send the body as plain text instead of formatted HTML. | default: `false` |
| `track_open` | boolean | no | Track when a recipient opens the email. | default: `false` |
| `track_click` | boolean | no | Track when a recipient clicks a link. | default: `false` |
| `remove_sheetgo_layout` | boolean | no | Send without the Sheetgo email layout. | default: `false` |
| `multiple_email_split` | boolean | no | Send a separate email per address when a column holds several. | default: `false` |
| `send_from` | [SendFrom](https://dev-api.sheetgo.com/rest/reference/models/SendFrom.md) | no | Which mailbox sends the emails: `gmail` (default), `outlook_personal` (a personal Microsoft account) or `outlook_work` (a work or school Microsoft account). An Outlook account must be connected in Sheetgo with permission to send mail, or the request is rejected with 412 `outlook_not_connected`. | default: `"gmail"` |
| `unused_fields` | [UnusedFields](https://dev-api.sheetgo.com/rest/reference/models/UnusedFields.md) | no | What to do when a {{Tag}} matches no source column: `error` fails the run, `ignore` leaves it blank. | default: `"error"` |
| `generator_controller` | boolean | no | Add a column to the source data tracking each email sent. | default: `true` |
| `generator_controller_prefix` | string, nullable | no | Prefix for the control column's header. Defaults to the automation name. |  |
| `markdown_formatting` | boolean | no | Render markdown found in cell values as formatted text. | default: `false` |

## Used by

- [GET /rest/beta/automations/](https://dev-api.sheetgo.com/rest/reference/automations.md#get-rest-beta-automations)
- [GET /rest/beta/automations/{id}](https://dev-api.sheetgo.com/rest/reference/automations.md#get-rest-beta-automations-id)
- [GET /rest/beta/workflows/](https://dev-api.sheetgo.com/rest/reference/workflows.md#get-rest-beta-workflows)
- [GET /rest/beta/workflows/{id}](https://dev-api.sheetgo.com/rest/reference/workflows.md#get-rest-beta-workflows-id)
- [PATCH /rest/beta/automations/{id}](https://dev-api.sheetgo.com/rest/reference/automations.md#patch-rest-beta-automations-id)
- [PATCH /rest/beta/workflows/{id}](https://dev-api.sheetgo.com/rest/reference/workflows.md#patch-rest-beta-workflows-id)
- [POST /rest/beta/automations/](https://dev-api.sheetgo.com/rest/reference/automations.md#post-rest-beta-automations)
- [POST /rest/beta/workflows/](https://dev-api.sheetgo.com/rest/reference/workflows.md#post-rest-beta-workflows)
- [PUT /rest/beta/automations/{id}](https://dev-api.sheetgo.com/rest/reference/automations.md#put-rest-beta-automations-id)
- [AutomationCreate](https://dev-api.sheetgo.com/rest/reference/models/AutomationCreate.md)
- [AutomationModel](https://dev-api.sheetgo.com/rest/reference/models/AutomationModel.md)
- [AutomationReplace](https://dev-api.sheetgo.com/rest/reference/models/AutomationReplace.md)
- [WorkflowAutomationModel](https://dev-api.sheetgo.com/rest/reference/models/WorkflowAutomationModel.md)

---

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.
