template2text - Create Text / HTML from Template and Data

Creates any text from template and given data. For example, dynamically generate HTML templates with data and logic, making it useful for building dynamic web applications. Based on Handlebars - see https://handlebarsjs.com/ for more details.

template
Type
string
Required
required
Template to be filled in with data. For expressions you can use the following syntaxes: {{ name }} and { { name } }. See handlebars documentation.
Example:
"{{#each peopleData}}<div class='person'><h2>{{name}}</h2><p><strong>Age:</strong> {{age}}</p><p><strong>Occupation:</strong> {{occupation}}</p><p><strong>Email:</strong> {{email}}</p></div>{{/each}}"
data
Type
object
Data used to fill the template.
Example:
{
  "peopleData": [
    {
      "name": "John Smith",
      "age": 32,
      "occupation": "Software Engineer",
      "email": "john.smith@example.com"
    },
    {
      "name": "Jane Doe",
      "age": 27,
      "occupation": "Marketing Manager",
      "email": "jane.doe@example.com"
    }
  ]
}
dataString
Type
string
Stringified Data used to fill the template.
Example:
{"peopleData":[{"name":"John Smith","age":32,"occupation":"Software Engineer","email":"john.smith@example.com"},{"name":"Jane Doe","age":27,"occupation":"Marketing Manager","email":"jane.doe@example.com"}]}
noEscape
Type
boolean
Set to true to not HTML escape any content.
preventIndentation
Type
boolean
By default, an indented partial-call causes the output of the whole partial being indented by the same amount. This can lead to unexpected behavior when the partial writes pre-tags. Setting this option to true will disable the auto-indent feature.
Example:

Available on

Postman
Make
Zapier
Swagger
N8N
Airtable
SeaTable
Bubble
Power Automate
Workato
SAP Build