cancel
Showing results for 
Search instead for 
Did you mean: 

Generate dynamic HTML file in snaplogic

shashish_jha
New Contributor II

Hi All,
Have a question:
I have a Script file that generates a dynamic html file.
And this dynamic html file generated is fed into EMAIL SENDER snap.
Problem: I want to place my script file inside snaplogic directly.
Unable to achieve this.
I am pasting my script here:
script.txt (10.4 KB)

If any one can help me how to place the script code into snaplogic.
Tried using script snap but was unable to make it work.
Any help would be much appreciated.

1 ACCEPTED SOLUTION

koryknick
Employee
Employee

@shashish.jha - welcome to Community!

It looks like you want to generate dynamic HTML using the JSON document input wihtin a pipeline, correct? One out-of-the-box solution is to use an XML Generator snap. This does make the syntax a little more strict since XML requires open and close tags, but it will work. I’ve attached an example.
Dynamic HTML_2023_02_27.slp (7.7 KB)

To try it out, just upload the pipeline, create a triggered task, and call it from a browser.

If you want something a bit easier to use that supports CSS and HTML Script within the HTML body, you can contact your CSM to request the HTML Generator custom snap.

Hope this helps!

View solution in original post

5 REPLIES 5

This is helpful.
Thanks @koryknick .