APIs & Integrations

jayjiang
Member

How can I get list of every email sent to contacts

SOLVE

I need to get an export of all emails sent to contacts. Essentially a concise dump of marketing emails activities.

Anyway to get this?

0 Upvotes
1 Accepted solution
cbarley
Solution
HubSpot Alumni
HubSpot Alumni

How can I get list of every email sent to contacts

SOLVE

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.

View solution in original post

0 Upvotes
7 Replies 7
cbarley
Solution
HubSpot Alumni
HubSpot Alumni

How can I get list of every email sent to contacts

SOLVE

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.

0 Upvotes
AndreaM02
Participant

How can I get list of every email sent to contacts

SOLVE

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! 

jmsanders
Participant

How can I get list of every email sent to contacts

SOLVE

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.

0 Upvotes
jayjiang
Member

How can I get list of every email sent to contacts

SOLVE

Is there anyway to get the information at scale for 60k contacts?

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

How can I get list of every email sent to contacts

SOLVE

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:

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

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

How can I get list of every email sent to contacts

SOLVE

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.

0 Upvotes
jayjiang
Member

How can I get list of every email sent to contacts

SOLVE

So there's no export activities api to get a list of emails in the screenshot below?