CMS Development

dmilovanov
Member

Pre-fetch data from external API in Email Module

SOLVE

Hi,

im going to create a special email module for my emailing purposes. In best case this module schould be stand-alone, so i can reuse  it in all my email templates without adjusting (adding custom code) my workflows every single time (like Drag and Drop).

This takes user preferences (list of ids, already saved in user) and schould be able to fetch data from external server responding with "xml" content type and then preprocess it a little bit.

What is the best approach to fetch data inside a module for email template? As I know, usage of js files as well as  <script> tag is not supported by email clients.

Thanks!

1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Pre-fetch data from external API in Email Module

SOLVE

Hi @dmilovanov ,

 

I tried to build this for a client, but this isn't really possible without using the Single Send API and custom tokens in your email.
The best thing you can probably do is store the information in HubSpot instead of retrieving it from an external platform if you want to be able to use the drag and drop emails. Either in a custom object or in contact properties, depending on the usecase.



Did my answer solve your issue? Help the community by marking it as the solution.

View solution in original post

2 Replies 2
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Pre-fetch data from external API in Email Module

SOLVE

Hi @dmilovanov ,

 

I tried to build this for a client, but this isn't really possible without using the Single Send API and custom tokens in your email.
The best thing you can probably do is store the information in HubSpot instead of retrieving it from an external platform if you want to be able to use the drag and drop emails. Either in a custom object or in contact properties, depending on the usecase.



Did my answer solve your issue? Help the community by marking it as the solution.
dennisedson
HubSpot Product Team
HubSpot Product Team

Pre-fetch data from external API in Email Module

SOLVE

@Teun  what are you thinking? 😀

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes