Operations (sample payloads)

Main operations

Template

Use Mustache templating to substitute variables into a HTML template. Sample Input

{
    "parameters": \{
        "name": "John Doe",
        "company": "Acme Inc.",
        "position": "Software Engineer",
        "years_experience": 5
    \},
    "template": "<html><body><h1>Employee Profile</h1><p>Name: \{\{name\}\}</p><p>Company: \{\{company\}\}</p><p>Position: \{\{position\}\}</p><p>Years of Experience: \{\{years_experience\}\}</p>\{\{> skills\}\}</body></html>",
    "partials": {
        "skills": "<h2>Skills</h2><ul><li>JavaScript</li><li>Python</li><li>React</li></ul>"
    }
}

Sample Output

{
    "result": "<html><body><h1>Employee Profile</h1><p>Name: John Doe</p><p>Company: Acme Inc.</p><p>Position: Software Engineer</p><p>Years of Experience: 5</p><h2>Skills</h2><ul><li>JavaScript</li><li>Python</li><li>React</li></ul></body></html>"
}

Was this page helpful?