Is it possible to get EmailCampaign ids from the MarketingEmail api?
解決
While we wait on a v3 api for Get EmailCampaigns by Id, I'm hoping to find a different way to get all the EmailCampaign names and ids in as few calls as possible, so that we may later query related EmailCampaign events. Right now we use the v1 api, but we need to also pull the campaign names--which means one additional call per campaign. Hubspot's api limits do NOT like when we do this!
The marketing api looks nearly perfect on a surface level. I understand that all EmailCampaign objects are associated to a single MarketingEmail object. However, as far as I can see, GET ../marketing/v3/emails does not include the EmailCampaign id, only he MarketingEmail id. (Phew, hope I'm keeping my terminology straight!)
Is there a parameter I can include in the query to get that EmailCampaign id? Alternatively, is it possible to query for all email events by the MarketingEmail id instead of the EmailCampaign id?
I'm not overly familiar with the Marketing Emails / Campaigns APIs, but I'm more than happy to try to offer assistance here.
As best I can tell, the GET Marketing Emails V3 endpoint (see Marketing Email API [Beta]) gives you some associated Campaign information, including Campaign Name (response key 'campaignName') and Campaign GUID (response key 'campaign'). However, the GET Marketing Emails V1 endpoint seems to give you a bit more Campaign-related information, including the Campaign ID (response keys of potential interest include: 'primaryEmailCampaignId', 'allEmailCampaignIds', 'emailCampaignGroupId', 'campaign', 'campaignName').
Again, I don't spend much time working with these APIs, so I might be way off. Regardless, I hope that proves helpful. Please let me know if you have any follow-up questions.
All the best,
Zach
--
Zach Klein HubSpot Integrations & App Developer Meanjin / Brisbane, Australia
I'm not overly familiar with the Marketing Emails / Campaigns APIs, but I'm more than happy to try to offer assistance here.
As best I can tell, the GET Marketing Emails V3 endpoint (see Marketing Email API [Beta]) gives you some associated Campaign information, including Campaign Name (response key 'campaignName') and Campaign GUID (response key 'campaign'). However, the GET Marketing Emails V1 endpoint seems to give you a bit more Campaign-related information, including the Campaign ID (response keys of potential interest include: 'primaryEmailCampaignId', 'allEmailCampaignIds', 'emailCampaignGroupId', 'campaign', 'campaignName').
Again, I don't spend much time working with these APIs, so I might be way off. Regardless, I hope that proves helpful. Please let me know if you have any follow-up questions.
All the best,
Zach
--
Zach Klein HubSpot Integrations & App Developer Meanjin / Brisbane, Australia
Thank you for providing all the details and sharing the links to the information you have already reviewed. It's always helpful to have such thorough information to understand what has been done so far. On another note, I didn't come across the option you are looking for, but let's consult with some of our experts to see if they have tried adding any other parameters to the query to achieve your goal, or if they have any other suggestions.