When looking to pull marketing/transactional emails sent to a particular contact, you can use the method shared by Connor onthis dev forum thread:
If you just need the names of the emails sent to a contact you should be able to use theget contact by videndpoint 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 thepropertyModetovalue_and_history. You could then utilize theEmail Events APIto pull opens/clicks and other email events for a specific email address.
For the GET contacts endpoint, the URL would look something like this:
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.
How to get all the marketing emails sent to contacts
This is great but it only lets me see the last email. I need all email history ever, for all time, infinity, etc. How can we see this easily? There doesn't appear to be a field in hubspot that captures this which means we either have to do it manually or otherwise. Any help is much appreciated.
How to get all the marketing emails sent to contacts
Hi Wendy - Yes, the problem is that it does not pull in Transactional emails. So not all emails are accounted for.
We need a better way to pull this data into reports on the platform. We have to run 14-20 JSON Queries since we can only run 100 at a time. For enterprise customers, this is not scalable. Additionally, we have to then run the JSON back through a JSON to CSV Converter so we can work with the file in a more digestable format. There has to be a better way.