I need a suggestion from the great minds out here.
I am trying to implement a way by which I can format content rendered from a third party source into my email delivery.
For example, I use the following code
<%@ include file="anyThirdPartyUrl" %> in my email delivery, which renders some content.
But I want to format the content before it is displayed in the customer's inbox.
What I tried was to call this "anyThirdPartyUrl" in a Jssp, format it the way I want and then call the Jssp URL in the email delivery like this
<%@ include file="jsspInMyMktInstance" %>
But this resulted in an error (failed to call/load directive). Not sure if this is at all possible, and I need some advice for the same.
I don't believe any email clients have ever allowed js due to the attack surface that would create.
To process the third party content, you can fetch it in the workflow with HTTPClientRequest, assign it to the delivery's variables, then add <% JSON.parse(variables.content) %> or <% eval(sanitizeThirdPartyCodeBeforeRunning(variables.content)) %> in the content.