# set_automation_action

Set or update the action for an automation workflow. Calling this on a workflow that already has an action updates it in
place; calling it on one with no action creates one. Today only `send_email` is supported. The `to`/`cc`/`bcc` lists
each accept a mix of recipient types (`guest`, `owner`, `lead_inquirer`) and custom email addresses.

<!-- INPUT_BLOCK_START -->

## Input

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | `string` | Yes | The ID of the workspace |
| `workflowId` | `string` | Yes | The ID of the automation workflow |
| `actionType` | `ActionType` | No | Type of action to perform - [ActionType](#actiontype) |
| `email` | `EmailActionConfig` | Yes | Email configuration - [EmailActionConfig](#emailactionconfig) |

### EmailActionConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `to` | `string[]` | Yes | Recipients list — at least one required. Can include recipient types (guest, owner, lead_inquirer) or custom email addresses |
| `cc` | `string[]` | No | CC recipients (can include recipient types or custom email addresses) |
| `bcc` | `string[]` | No | BCC recipients (can include recipient types or custom email addresses) |
| `subject` | `string` | Yes | Email subject line. Supports Liquid tokens: {{ token.name }} (e.g., {{ guest.first_name }}, {{ booking.confirmation_code }}) |
| `body` | `string` | Yes | Email body in HTML format. Supports Liquid tokens: {{ token.name }}. Available tokens depend on trigger type. For booking triggers: guest.*, booking.*, property.*, host.*, guest_invoice.*, guest_payment.*, workspace.*. For lead_status_changed: lead_inquirer.*, workspace.* |

### ActionType

| Value | Description |
| --- | --- |
| `send_email` | Send an email — currently the only supported action type. |

<!-- INPUT_BLOCK_END -->

<!-- OUTPUT_BLOCK_START -->

## Output

| Field | Type | Description |
| --- | --- | --- |
| `content` | `ContentItem[]` | Array of content items returned by the tool - [ContentItem](#contentitem) |
| `isError` | `boolean` | Whether the tool execution resulted in an error |

### ContentItem

| Field | Type | Description |
| --- | --- | --- |
| `type` | `'text'` | Content type (currently only 'text' is supported) |
| `text` | `string` | The text content to display |

<!-- OUTPUT_BLOCK_END -->
