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 combo box Set property, select the property which shall be used for filling out the template.
- In the drop-down list Format, select Mustache template.
- In the text box Template, specify the template using the Mustache template syntax.
- In the drop-down list Output as, 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.