Message Template Documentation
Version: 3.0.0
Retrieved: 2025-10-09 15:16:02
Message Template
This module is used for creation of messages based on a JSON template. Dynamic values can be assigned by referencing incoming message data. Anything surrounded by {} will be treated as a reference to a message property and will be replaced by the corresponding value in the output message. With this module it is easy to add complex message structures anywhere in a flow.
Settings
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| Target Property | String with length 1-64 | Property to store the resulting message in. | data |
| JSON Template | String with length 1-N | JSON template to use for creating the message | {} |
Input
The input requirement is that all the properties that is used in JSON Template exists on the message, otherwise no restrictions.
Output
Same message as input with appended property that is set in Target Property, which contains the result from the JSON Template specifications.
Examples
Example 1
# Settings:
Template =
{
"values": [
{
"temperature": {data.temp}
},
{
"pressure": {data.pressure}
}
]
}
Target Property = result
# Incoming message:
{
"data": {
"temp": 25,
"pressure": 1013
}
}
# Outgoing message:
{
"result": {
"values": [
{
"temperature": {data.temp}
},
{
"pressure": {data.pressure}
}
]
}
}
Example 2
# Settings
Template =
{
"machineName": "machine.{machine.id}"
}
Target Property = result
# Incoming message
{
"machine": {
"id": "bailing1"
}
}
# Outgoing message
{
"result": {
"machineId": "machine.bailing1"
}
}
Search Documentation