Creating Email Engagements


#1

When I create an email engagement for a contact I’m not seeing the body of the mail displayed in the UI. Also are there additional metadata fields to include things like the following?

  • Subject
  • To Addresses
  • From Address
  • CC
  • BCC
  • Attachments

#2

Hi James

Email engagements have a slightly different JSON structure than the other engagement types. It should look similar to this:

{
“engagement”: {
“active”: true,
“type”: “EMAIL”
},
“associations”: {
“contactIds”: [
315
],
“companyIds”: [
85965
],
“dealIds”: [],
“ownerIds”: []
},
“metadata”: {
“from”: {
“email”: “dbertschi@hubspot.com",
“firstName”: “Daniel",
“lastName”: “Bertschi"
},
“to”: [
{
“email”: “Daniel Bertschi dbertschi@hubspot.com"
}
],
“cc”: [],
“bcc”: [],
“subject”: “Email subject”,
“html”: "

Email Body
",
“text”: “Email Body”
}
}

Best, Daniel


#3

Thanks Daniel, this should really be added to the docs.


#4

Totally agreed. I’ll ask for this to be added to the docs.


#5

James, just a quick note to let you know that the docs were updated:

Best, Daniel


#6

Hi Daniel,

In which parameter should I provide my email body to log it in well formatted manner in Hubspot? Do I need to pass it in “html” or in “text” or both?

Thanks in advance!


#7

This worked somewhat for me. But I'm not seeing the From and To fields in the UI, even though I can see I am sending them as you suggested.