CMS Development

dmilovanov
Membre

Pre-fetch data from external API in Email Module

Résolue

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 Solution acceptée
Teun
Solution
Expert reconnu | Partenaire solutions Diamond
Expert reconnu | Partenaire solutions Diamond

Pre-fetch data from external API in Email Module

Résolue

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.



Learn more about HubSpot by following me on LinkedIn or YouTube

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


Voir la solution dans l'envoi d'origine

2 Réponses
Teun
Solution
Expert reconnu | Partenaire solutions Diamond
Expert reconnu | Partenaire solutions Diamond

Pre-fetch data from external API in Email Module

Résolue

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.



Learn more about HubSpot by following me on LinkedIn or YouTube

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


dennisedson
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Pre-fetch data from external API in Email Module

Résolue

@Teun  what are you thinking? 😀

0 Votes