Clarification on email_events IDs


#1

What is the difference between emailCampaignId and emailCampaignGroupId? Does emailCampaignId refer to a specific email sent to a specific contact vs emailCampaignGroupId which would only refer to 1 email template?

In the UI there is a hubspot internal ID for each email - would this correspond to either the emailCampaignId or the emailCampaignGroupId? If not either, which field in email events does it map to?


#2

Hi @klu

The emailCampaignGroupId can refer to a set of individual sends of an email, while a emailCampaignId would refer to one of those individual sends.

As an example, if you use our Smart Send feature to send an email in different time zones, each time zone would have a different emailCampaignId for the send to that time zone, while the emailCampaignGroupId would refer to the set of all of the individual sends of the email across all time zones.

The Internal ID you see in HubSpot will generally be the group ID for emails that would result in that type of group send, otherwise for single sends it will be the campaign ID.


#3

Thanks @dadams

The Internal ID you see in HubSpot will generally be the group ID for emails that would result in that type of group send, otherwise for single sends it will be the campaign ID.

If you do a multiple group sends of the same email, how would you identify that there are two batches sent of one email? Is there any ID that refers to the email content rather than the send event?

On that note, I don’t seem to see a field that shows the content of the email message. Would that be available anywhere?


#4

Hi @dadams,

Thanks for the clarification.

It would be helpful to update the documentation e.g. https://developers.hubspot.com/docs/methods/email/get_events with the additional clarification that you provided here. I found this thread after doing some tests and experiencing similar confusion. This also threw our developers, resulting in an integration that extracted the data the wrong way.

  • Clarify that if a campaignId parameter is included in the request, the results will include any events where the emailCampaignId or emailCampaignGroupId match the campaignId parameter.
  • Incorporate emailCampaignGroupId into the JSON example to underscore that the results may include both emailCampaignId and emailCampaignGroupId.

Thanks!