API for CTAs in content export


#1

During the import of "post_body" from content/api/v2/blog-posts/ everything is rendered fine just except the call to action (CTA) button
which is in raw hubspot template format with its UUID like:
{{cta('30d96556-b5ed-42aa-af36-a01dd3fffbd9','justifycenter')}}

which we have no clue how to render. How can we display the button correctly for posts we import onto another platform? Can anyone tell us what the javascript embed code looks like in place of the template marker, and what javascript and/or CSS includes would be required?


#3

Hi @Jackie_Fleming, so that I'm on the same page as you, can you confirm that you're using the endpoint "content/api/v2/blog-posts/" to export blog content from HubSpot into another CMS? If so, this CTA code won't make sense to your external CMS. You'll need to embed each CTA via the embed code: https://knowledge.hubspot.com/cta-user-guide-v2/how-to-add-a-call-to-action-cta-to-a-non-hubspot-page. Let me know if I'm off-base with my assumption here.


#4

Thanks @Connor_Barley, that is what we ended up figuring out! Our follow-up issue is how to export the featured images that accompany each blog post FROM hubspot TO another CMS. Can you provide insight here? Thanks!


#5

hey @Jackie_Fleming, you should be able to export your website data in raw HTML by following this article: https://knowledge.hubspot.com/articles/kcs_article/account/how-do-i-download-my-content-and-data-when-canceling-my-hubspot-account#pages-and-posts. You can also grab a featured image field on each blog post by using this endpoint: https://developers.hubspot.com/docs/methods/blogv2/get_blog_posts.