APIs & Integrations

JasonMiani
Member

How to Pull All Marketing Emails Sent to a Specified Recipient with Email Content?

I am looking to integrate Hubspot with my CRM and I want to be able to display the emails with content (ideally other activities) that have been sent to each recipient in my CRM.

 

I see that https://api.hubapi.com/email/public/v1/events?hapikey={{HAPIKEY}}&recipient={{RECIPIENT_EMAIL}}&eventType=SENT includes subject and id.

It does not, however, include the email body.

 

When I run https://api.hubapi.com/marketing-emails/v1/emails/{{emailId}}?hapikey={{HAPIKEY}} and utilize the email id from the previous request, it does not return anything.

 

Is there a way for me to get the emails that have been sent along with the email content(body) via the api?

2 Replies 2
coldrickjack
Top Contributor | Elite Partner
Top Contributor | Elite Partner

How to Pull All Marketing Emails Sent to a Specified Recipient with Email Content?

Hey @JasonMiani,

 

Unfortunately there is no way to pull the actual content that was sent to a recipient from HubSpot via API. it's not even stored on the contact record in HubSpot. The only known way (to my knowledge) to get this content would be to setup the compliance copy email feature. I'm not saying it's the solution to your problem but wanted to post for transparency. 

Jack Coldrick, Head of Presales & Solution Architecture @ Inbound Fintech | HubSpot Elite Partner
Inbound Fintech - HubSpot Elite Partner
0 Upvotes
JasonMiani
Member

How to Pull All Marketing Emails Sent to a Specified Recipient with Email Content?

Thanks for the quick response. I may have found a working solution. Can you help verify?

 

  1. Get All received Emails by Recipient’s Email Address
  2. Get All Marketing Emails for the account.
  3. Compare Email Subjects of the first request with the second.
    1. Return IDs where the subjects are the same for each email.
  4. Lookup the email contents with the Get Specific Email by ID.
0 Upvotes