> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Engagements - CreateEmail

- Component: `appmixer.hubspot.engagements.CreateEmail`
- Kind: Action
- Version: 2.2.0
- Visibility: Public
- Connector: [appmixer.hubspot 4.10.0](https://connectors.appmixer.com/connector/appmixer.hubspot/4.10.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.hubspot/4.10.0/component/appmixer.hubspot.engagements.CreateEmail>

Create a email with the given properties and return a copy of the object, including the ID.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Contact ID (`contactId`) | text | The ID of the contact to associate with. |
| Email Timestamp (`hsTimestamp`) | text | This field marks the email's time of creation and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format. |
| Owner ID (`hubspotOwnerId`) | text | The ID of the owner associated with the email. This field determines the user listed as the email creator on the record timeline. |
| Email Direction (`hsEmailDirection`) | select | The direction the email was sent in. Possible values include: EMAIL: the email was sent from the CRM or sent and logged to the CRM with the BCC address. INCOMING_EMAIL: the email was a reply to a logged outgoing email. FORWARDED_EMAIL: the email was forwarded to the CRM. . |
| Email HMTL (`hsEmailHtml`) | text | The body of an email if it is sent from a CRM record. |
| Email Status (`hsEmailStatus`) | select | The send status of the email. |
| Email Subject (`hsEmailSubject`) | text | The subject line of the logged email. |
| Email Text (`hsEmailText`) | text | The subject line of the logged email. |
| Email Attachment IDs (`hsAttachmentIds`) | text | The IDs of the email's attachments. Multiple attachment IDs are separated by a semi-colon. |
| Email Headers (`hsEmailHeaders`) | text | The email's headers. The value for this property will automatically populate certain read only email properties. Learn how to set email headers. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Id (`id`) | - | - |
| Properties (`properties`) | object | - |
| Created At (`createdAt`) | - | - |
| Updated At (`updatedAt`) | - | - |
| Archived (`archived`) | boolean | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.hubspot.engagements.CreateEmail",
  "author": "Appmixer <info@appmixer.com>",
  "label": "Engagements - CreateEmail",
  "icon": "(data URI omitted)",
  "description": "Create a email with the given properties and return a copy of the object, including the ID.",
  "private": false,
  "auth": {
    "service": "appmixer:hubspot"
  },
  "quota": {
    "manager": "appmixer:hubspot",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string"
          },
          "hsTimestamp": {
            "type": "string"
          },
          "hubspotOwnerId": {
            "type": "string"
          },
          "hsEmailDirection": {
            "type": "string"
          },
          "hsEmailHtml": {
            "type": "string"
          },
          "hsEmailStatus": {
            "type": "string"
          },
          "hsEmailSubject": {
            "type": "string"
          },
          "hsEmailText": {
            "type": "string"
          },
          "hsAttachmentIds": {
            "type": "string"
          },
          "hsEmailHeaders": {
            "type": "string"
          }
        },
        "required": [
          "contactId",
          "hsTimestamp",
          "hsEmailDirection"
        ]
      },
      "inspector": {
        "inputs": {
          "contactId": {
            "type": "text",
            "label": "Contact ID",
            "tooltip": "The ID of the contact to associate with.",
            "index": 1
          },
          "hsTimestamp": {
            "type": "text",
            "label": "Email Timestamp",
            "tooltip": "This field marks the email's time of creation and determines where the email sits on the record timeline. You can use either a Unix timestamp in milliseconds or UTC format.",
            "index": 2
          },
          "hubspotOwnerId": {
            "type": "text",
            "label": "Owner ID",
            "tooltip": "The ID of the owner associated with the email. This field determines the user listed as the email creator on the record timeline.",
            "index": 3
          },
          "hsEmailDirection": {
            "type": "select",
            "label": "Email Direction",
            "tooltip": "The direction the email was sent in. Possible values include:\n\nEMAIL: the email was sent from the CRM or sent and logged to the CRM with the BCC address.\n\nINCOMING_EMAIL: the email was a reply to a logged outgoing email.\n \nFORWARDED_EMAIL: the email was forwarded to the CRM.\n .",
            "options": [
              {
                "label": "Email",
                "value": "EMAIL"
              },
              {
                "label": "Incoming Email",
                "value": "INCOMING_EMAIL"
              },
              {
                "label": "Forwarded Email",
                "value": "FORWARDED_EMAIL"
              }
            ],
            "index": 4
          },
          "hsEmailHtml": {
            "type": "text",
            "label": "Email HMTL",
            "tooltip": "The body of an email if it is sent from a CRM record.",
            "index": 5
          },
          "hsEmailStatus": {
            "type": "select",
            "label": "Email Status",
            "tooltip": "The send status of the email.",
            "options": [
              {
                "label": "Bounced",
                "value": "BOUNCED"
              },
              {
                "label": "Failed",
                "value": "FAILED"
              },
              {
                "label": "Scheduled",
                "value": "SCHEDULED"
              },
              {
                "label": "Sending",
                "value": "SENDING"
              },
              {
                "label": "Sent",
                "value": "SENT"
              }
            ],
            "index": 6
          },
          "hsEmailSubject": {
            "type": "text",
            "label": "Email Subject",
            "tooltip": "The subject line of the logged email.",
            "index": 7
          },
          "hsEmailText": {
            "type": "text",
            "label": "Email Text",
            "tooltip": "The subject line of the logged email.",
            "index": 8
          },
          "hsAttachmentIds": {
            "type": "text",
            "label": "Email Attachment IDs",
            "tooltip": "The IDs of the email's attachments. Multiple attachment IDs are separated by a semi-colon.",
            "index": 9
          },
          "hsEmailHeaders": {
            "type": "text",
            "label": "Email Headers",
            "tooltip": "The email's headers. The value for this property will automatically populate certain read only email properties. Learn how to set email headers.",
            "index": 10
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "Id",
          "value": "id",
          "schema": {
            "example": "98765432"
          }
        },
        {
          "label": "Properties",
          "value": "properties",
          "schema": {
            "type": "object",
            "properties": {
              "hs_body_preview_is_truncated": {
                "label": "Body Preview Is Truncated",
                "value": "hs_body_preview_is_truncated"
              },
              "hs_createdate": {
                "label": "Create Date",
                "value": "hs_createdate"
              },
              "hs_email_attached_video_opened": {
                "label": "Email Attached Video Opened",
                "value": "hs_email_attached_video_opened"
              },
              "hs_email_attached_video_watched": {
                "label": "Email Attached Video Watched",
                "value": "hs_email_attached_video_watched"
              },
              "hs_email_direction": {
                "label": "Email Direction",
                "value": "hs_email_direction"
              },
              "hs_lastmodifieddate": {
                "label": "Last Modified Date",
                "value": "hs_lastmodifieddate"
              },
              "hs_object_id": {
                "label": "Object Id",
                "value": "hs_object_id"
              },
              "hs_object_source": {
                "label": "Object Source",
                "value": "hs_object_source"
              },
              "hs_object_source_id": {
                "label": "Object Source Id",
                "value": "hs_object_source_id"
              },
              "hs_object_source_label": {
                "label": "Object Source Label",
                "value": "hs_object_source_label"
              },
              "hs_timestamp": {
                "label": "Timestamp",
                "value": "hs_timestamp"
              }
            },
            "example": {
              "hs_email_direction": "EMAIL",
              "hs_email_subject": "Follow-up on our call",
              "hs_email_status": "SENT",
              "hs_timestamp": "2026-07-24T12:00:00.000Z"
            }
          }
        },
        {
          "label": "Created At",
          "value": "createdAt",
          "schema": {
            "example": "2026-01-15T10:30:00.000Z"
          }
        },
        {
          "label": "Updated At",
          "value": "updatedAt",
          "schema": {
            "example": "2026-01-15T10:30:00.000Z"
          }
        },
        {
          "label": "Archived",
          "value": "archived",
          "schema": {
            "type": "boolean",
            "example": false
          }
        }
      ]
    }
  ],
  "version": "2.2.0",
  "dependencies": {
    "service": "1.0.1"
  }
}
```
