I need to get an export of all emails sent to contacts. Essentially a concise dump of marketing emails activities.
Anyway to get this?
I need to get an export of all emails sent to contacts. Essentially a concise dump of marketing emails activities.
Anyway to get this?
Hi @jayjiang, there’s no easy way to pull this info. You can try the email events API to get specific events that happen in an email: https://developers.hubspot.com/docs/methods/email/email_events_overview in conjunction with pulling templates with the templates API, but no way to pull the exact information you’re seeking.
So there’s no export activities api to get a list of emails in the screenshot below?
[
activities screenshot.png1245x942 63.8 KB
Hi @jayjiang, sorry, I might have misspoke/misunderstood you. 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:
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
Is there anyway to get the information at scale for 60k contacts?
Hi @jayjiang, you should actually be able to use the get all contacts endpoint with the property history above to page through your contacts 100 at a time, then make a subsequent call to the GET email events endpoint based on the email addresses returned, but this would be pretty heavy on API calls. As I noted previously, it’s technically possible, but probably best to look at higher level data.
I can’t believe that this hasn’t been resolved or added as reporting functionality. Every company wants to track the emails that a person has received over time. It helps with attribution, optimization, etc. This NEEDS to be on the roadmap. Its painful to comb through JSON to get this!
Precog.com has been providing a very easy to connect, read, ingest and flatten platform for all data sources especially JSON in Hubspot or elsewhere.