APIs & Integrations

nickianspencer
Member

Get Template From Email Campaign VIA API

I am trying to get the email template associated with a campaign from a specific engagement. This is so I can convert the HTML file to a PDF and upload it to another service.

Currently I am getting the Campaign data from the engagement and using the contentId as the ID in my query to the template API (Get Template By ID). This isn’t working. Is there any other way I can get the associated email template from a campaign via the API?

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Get Template From Email Campaign VIA API

Hi @nickianspencer,

I believe our conversation on this other topic addresses this question:

Hi @nickianspencer, It’s not currently possible to pull the content of a marketing email via the API. That contentId is the id visible in the URL when viewing a marketing email in-app, and can’t be used to pull the email via API. I can see the utility of this, and if you have the inclination, I would definitely encourage you post your use case to the Ideas Forum on the HubSpot Community.

0 Upvotes