create-text-from-template

Description

create-text-from-template adaptor creates a dynamic text using a Mustache template.

Inputs

template Type: text Required: Yes The Mustache template text that contains any number of Mustache variable tags. Variable tags are indicated by the double mustaches that surround them, e.g. {{ person }} is a tag.

variables Type: dictionary Required: Yes A dictionary of variable names (dictionary keys) with values (dictionary values).

Outputs

text Type: text The rendered text.

Examples

Example 1: Default behaviour.

Inputs:

template: {{city}} is the only city in {{county}}, {{country}}, of which it is the county town. It had a population of {{population}} at the {{year}} census.

variables:

KEYVALUE

city

World

county

Oxfordshire

country

England

population

162,100

year

2021

Outputs:

text: Oxford is the only city in Oxfordshire, England, of which it is the county town. It had a population of 162,100 at the 2021 census.

-> Created a dynamic text using the Mustache variable tags {{city}}, {{country}} {{county}}, {{population}} and {{year}}.

Use Cases

Last updated