Send payload with notify

I have a inject node with the numeric value 40.
In notify I want to send the payload from the inject node.
'''
{
"message":"test"+ {{msg.payload}},"title":"10.Test"
}
'''
Can you help me with the correct syntax.
Thankx in advance
Peter

Please, could you be more specific about the structure of the message.

msg.topic is your title and msg.payload is your message:

msg = {
    payload: `test ${msg.payload}`,
    topic: "10.Test"
};

Unfortunately I get an error with your proposal.

What error and can you show your nodes?

Call-service error. required key not provided @ data['message']

Could you export the nodes in question (ctrl + E), is it the "node-red-node-notify"?
Use the following syntax to insert your nodes:
```json
<FLOW_HERE>
```

json
[{"id":"415392015f043e85","type":"api-call-service","z":"50417ac5b5a5a836","name":"Test notify","server":"3c6b2d2d.b63e72","version":5,"debugenabled":false,"domain":"notify","service":"telegram","areaId":[],"deviceId":[],"entityId":[],"data":"msg = {\t    payload: `test ${msg.payload}`,\t    topic: \"10.Test\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":870,"y":4750,"wires":[[]]},{"id":"529fa993b3bd5cda","type":"inject","z":"50417ac5b5a5a836","name":"40","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"test","payload":"40","payloadType":"num","x":680,"y":4750,"wires":[["415392015f043e85"]]},{"id":"3c6b2d2d.b63e72","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

I don't use HA but to use mustache it would be something like

{
"message": "test{{msg.payload}}", 
"title": "10.Test"
}

Or select JSONata and use something like

{
"message": "test" & $$.payload, 
"title": "10.Test"
}

The last option is working.
Thanks very much for your help!!
Peter

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.