Get All Emails Sent From HubSpot

nigelL
Participant

Hi, I want to get all the emails sent (and the contents) from HubSpot so they can be seen from an external system (linked by the contacts email address). I see this post: https://community.hubspot.com/t5/APIs-Integrations/How-can-I-get-list-of-every-email-sent-to-contact...

 

Is this the only way? or can it be done using the new CRM Associations API?

 

Could you eleborate on the API Calls needed to do this?

 

Initially we would like to get all emails sent from a certain date.

 

However, if this is going to be too many calls, we may have to do it on a request basis, using the contacts email address to fetch all emails sent from a certain date.

 

Cheers,

Nigel.

 

 

0 Upvotes
2 Replies 2
WendyGoh
HubSpot Employee

Hey @nigelL,

 

When looking to pull marketing emails sent to a particular contact, the method that connor shared on the forum thread is still currently the way to do it. 

 

If you just need the names of the emails sent to a contact you should be able to use the get contact by vid endpoint to pull the names of the emails that were sent to a contact. You can do this by specifying the contact property "Last marketing email name", and set the propertyMode to value_and_history. You could then utilize the Email Events API to pull opens/clicks and other email events for a specific email address. For the GET contacts endpoint, the URL would look something like this: https://api.hubapi.com/contacts/v1/contact/vid/191/profile?hapikey=XXXXXXXXXXXX&property=hs_email_la... For the GET email events endpoint, your URL would look something like this: https://api.hubapi.com/email/public/v1/events?hapikey=XXXXXXX&recipient=emailgoeshere

Alternatively, you can create a contact list to pull a list of contact who was sent a particular marketing emails and use the Get contacts in a list | Contact Lists API to pull these contacts.

 

0 Upvotes
nigelL
Participant

Thankyou for the reply, I'm not finding an easy way to get the contents of the email or an id for the actual marketing email template that was used.  Is there a way to get the contents? I can only get the Subject of the email event and the id's to the actual event. But can't find an id for the marketing email and the content in any of the responses?

 

0 Upvotes