Generating text from message properties using a template node
You can generate text by filling out a template using message properties.
- Open Node-RED.
- Add a template node from the function category to the workspace.
- Double-click the template node to open the Edit node dialogue.
- In the Set property combo box, select the property which shall be used for filling out the template.
- In the Format drop-down list, select Mustache template.
- In the Template text box, specify the template using the Mustache template syntax.
- In the Output as drop-down list, select whether the node shall output plain text or a parsed JavaScript object.
- Click Done to apply your changes.
- Connect the input of the template node to the node that outputs the messages you want to generate text from.