Hi,
I’d like to get a list of all emails in my HS system.
I’d like to have the following information (for each mail):
mail_name total_received total_opened
"Don’t miss it!" 20 10
"last chance!" 15 8
After that i’d like to retrieve a list of mails and the users it was sent to:
mail_name sent_to
"Don’t miss it!" michael@test.com
"last chance!" david@test.com
"last chance!" jeff@test.com
Later i will join the two tables on my end.
Any ideas how can i do that? any help will be appreciated
Navigate to Content > Email and click Export at the top of the table list of emails.
Otherwise, if you’re looking to automate this report using the API, you can get that data using the Email Events API. You’d need to get the data from each email separately:
Hi @dadams
Tnx for getting back to me.
So AFA i undesrand, there’s no way of retrieving all of the emails information (like i can do with the export) with a single API call
@saar1 we don’t currently have a way to automate or schedule the export, so if you want to automate this you’d need to use the API.
If you get the data for a single campaign, you do get the overall sending stats for that campaign, so you wouldn’t need to pull all of the events to get those stats, but you would need to get each campaign separately:
What API call do i need to use in order to retrieve the Exact same result as if i’d get if I manually did the export (Go to content -> Email -> Sent - > export ) ?
If I have multiple campaigns associated with a single campaign, how can i get the ‘open’, ‘delivered’ information for each mail individually when using this API: Get campaign data for a given campaign
How would i differentiate between the different emails within the given campaign in the JSON i receive?
@saar1 there isn’t a single API call that will return the same data you’d get in the export; you’d need to get the data for the separate campaigns then aggregate that into the report.
For separate campaigns for a single email, you’ll want to group the data by the contentId that you’d get when pulling the campaign data. The contentId represents the ID of the email that you’d see in the HubSpot app, since you may end up with multiple campaigns if you have separate sends for the same email.