APIs & Integrations

klu
Member

Clarification on email_events IDs

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?

0 Upvotes
4 Replies 4
Dadams
HubSpot Employee
HubSpot Employee

Clarification on email_events IDs

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.

Ismith1
Participant

Clarification on email_events IDs

Is there anyway to see the EmailCampaignGroupID in HubSpot? I know you can see the individual emailcamapginids on the email itself but we are using these smart send features and I am seeing through our data export that the emailgroupids are unique but are not on the emails themselves. Where can we find this data internally to say that this emailgroupid is associated with this email? 

0 Upvotes
JamiesonC
Participant

Clarification on email_events IDs

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!

0 Upvotes
klu
Member

Clarification on email_events IDs

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?

0 Upvotes