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

# HubSpot: Update Marketing Email

> Update a HubSpot marketing email's name, subject line, sender, preview text, or HTML body. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Update a HubSpot marketing email's name, subject line, sender, preview text, or HTML body.

> [!NOTE]
>
> Tool ID: `hubspot_update_marketing_email`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'hubspot_update_marketing_email',
  {
    "email_id": "jane.doe@example.com"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run hubspot_update_marketing_email --input '{
  "email_id": "jane.doe@example.com"
}'
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe hubspot_update_marketing_email --json` for the complete live contract.

## Input reference

Update a marketing email with validated Deepline fields. Use this for partial changes like subject, sender, preview text, body HTML, or colors and fonts.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.email_id` | `string` | Yes | — | HubSpot marketing email ID. |
| `payload.name` | `string` | No | — | Internal HubSpot email name. |
| `payload.subject` | `string` | No | — | Email subject line. |
| `payload.from_name` | `string` | No | — | Sender display name. |
| `payload.reply_to` | `string` | No | — | Reply-to email address. |
| `payload.preview_text` | `string` | No | — | Preview text shown in inbox clients. |
| `payload.body_html` | `string` | No | — | HTML for the primary editable body module. Deepline rewrites the actual rendered template module for you. Works on emails built in the HubSpot editor and on any email using `@hubspot/email/dnd/plain_text.html`. for other templates without a rich-text module, clone an editor-built email instead. |
| `payload.send_on_publish` | `boolean` | No | — | Whether HubSpot should send automatically if the email is later published. |
| `payload.style` | `object` | No | — | Email colors and fonts, merged into the email's existing HubSpot styles. For other HubSpot style settings, pass `raw_data.content.styleSettings`. |
| `payload.raw_data` | `record` | No | — | Advanced HubSpot marketing email fields that Deepline does not model directly. `content` accepts only `styleSettings`, merged into the email's existing styles. Set list recipients with `to.contactIlsLists` (ILS list IDs) only. legacy `to.contactLists` is refused because HubSpot no longer accepts it and an empty one clears the ILS lists. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Update a marketing email with validated Deepline fields. Use this for partial changes like subject, sender, preview text, body HTML, or colors and fonts.",
    "properties": {
      "email_id": {
        "type": "string",
        "description": "HubSpot marketing email ID."
      },
      "name": {
        "type": "string",
        "description": "Internal HubSpot email name."
      },
      "subject": {
        "type": "string",
        "description": "Email subject line.",
        "allowsTemplatePlaceholders": true
      },
      "from_name": {
        "type": "string",
        "description": "Sender display name."
      },
      "reply_to": {
        "type": "string",
        "description": "Reply-to email address."
      },
      "preview_text": {
        "type": "string",
        "description": "Preview text shown in inbox clients.",
        "allowsTemplatePlaceholders": true
      },
      "body_html": {
        "type": "string",
        "description": "HTML for the primary editable body module. Deepline rewrites the actual rendered template module for you. Works on emails built in the HubSpot editor and on any email using `@hubspot/email/dnd/plain_text.html`; for other templates without a rich-text module, clone an editor-built email instead.",
        "allowsTemplatePlaceholders": true
      },
      "send_on_publish": {
        "type": "boolean",
        "description": "Whether HubSpot should send automatically if the email is later published."
      },
      "style": {
        "type": "object",
        "description": "Email colors and fonts, merged into the email's existing HubSpot styles. For other HubSpot style settings, pass `raw_data.content.styleSettings`.",
        "minProperties": 1,
        "properties": {
          "font_family": {
            "type": "string",
            "description": "Body font stack, for example `Lato,Tahoma,sans-serif` (styleSettings.primaryFont).",
            "minLength": 1
          },
          "font_size": {
            "type": "integer",
            "description": "Body font size in pixels (styleSettings.primaryFontSize).",
            "minimum": 8,
            "maximum": 72
          },
          "text_color": {
            "type": "string",
            "description": "Body text color (styleSettings.primaryFontColor). Hex color, for example `#23496d`.",
            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
          },
          "link_color": {
            "type": "string",
            "description": "Link color (styleSettings.linksFont.color). Hex color, for example `#23496d`.",
            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
          },
          "background_color": {
            "type": "string",
            "description": "Color around the email body (styleSettings.backgroundColor). Hex color, for example `#23496d`.",
            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
          },
          "body_background_color": {
            "type": "string",
            "description": "Color behind the email body (styleSettings.bodyColor). Hex color, for example `#23496d`.",
            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
          },
          "button_color": {
            "type": "string",
            "description": "Button fill color (styleSettings.buttonStyleSettings.backgroundColor). Hex color, for example `#23496d`.",
            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
          },
          "button_text_color": {
            "type": "string",
            "description": "Button text color (styleSettings.buttonStyleSettings.fontStyle.color). Hex color, for example `#23496d`.",
            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
          }
        },
        "additionalProperties": false
      },
      "raw_data": {
        "type": "object",
        "description": "Advanced HubSpot marketing email fields that Deepline does not model directly. `content` accepts only `styleSettings`, merged into the email's existing styles. Set list recipients with `to.contactIlsLists` (ILS list IDs) only; legacy `to.contactLists` is refused because HubSpot no longer accepts it and an empty one clears the ILS lists.",
        "additionalProperties": {}
      }
    },
    "required": [
      "email_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `record` | Yes | — | Provider response payload. |
| `result.meta` | `record` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "additionalProperties": {}
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.