Forum Discussion

shashish_jha's avatar
shashish_jha
New Contributor II
3 years ago
Solved

Generate dynamic HTML file in snaplogic

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 i...
  • koryknick's avatar
    3 years ago

    @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!