I’m getting pushback from my developers in regards to pushing some of our product data into a custom object in HubSpot. So they wanted me to look into if either of these alternatives are viable for pulling data into a HubSpot email.
My company builds online courses and we want an email to go out monthly with the most recently published ones. We already have our own API that we are able to query to pull data on those courses. Can a HubSpot email pull data from a third party API?
My team is also open to building out the data as an RSS feed.
If either option is available, what does it look like if a call to them ends with an error because our site is down? Does an email get sent by HubSpot with no data in it? Or does HubSpot keep trying until it retrieves data?
@jkupczak, if you have Marketing Hub Enterprise and Operations Hub Pro, you could try using the Marketing Single Send API and a custom code action. The marketing single send api is currently in beta so you will need to enroll before you can use it.
You could create a workflow for all course update subscribers. In that workflow you would have a custom code action that retireves your course data through your api. Then, you would include that course data in a single send api call to send the email to the contact. The course data is included in the call through an object like below:
And the custom properties can be included in your email template with HubL like below:
<!doctype html>
<html>
<p>
Congrats on purchasing some of the best ice cream around.
</p>
<a href={{custom.purchaseUrl}}>{{custom.productName}}</a>
</html>
I don’t have experience formatting the api call so hopefully the api documentation is adequate in that regard.
If you don’t have Ops Hub and custom code actions, you could still perform this call through a separate platform that your developers could configure.
@jkupczak, if you have Marketing Hub Enterprise and Operations Hub Pro, then you could use the Marketing Single Send API and a custom code action. The Single Send API is in beta so you will need to enroll in that first before creating the solution. This API allows you to send marketing emails and include custom properties that are not available on the contact record. If you do not have Operation Hub Pro, you could still use this API through another platform that your developers could configure.
To implement this you would create a workflow to enroll all course update subscribers. Then you would use a custom code action to retrieve the course data through your API and the single send endpoint to include it in your email. The custom properties are set in an object in the api call.
The call body also includes an email id that references a marketing email you have already created. Then, you would include your custom properties in the email using HubL tags.
I don’t have experience configuring this call in Node or Python, so hopefully the api endpoint documentation is adequate.