I’ve got the call service node working if I put the required config in the DATA field, see code block below. However, I want to pass this from a previous node not have a hard-coded notify node. So I use a change node in my flow and change msg.payload to replace msg.payload with the notification data below. When I do this the call service node errors out with a “extra keys not allowed” error.
I’ve read 100 different posts and I know I’m close I just can’t get it right. Anyone have any advice?
Call Service Node Data:
{"{{payload}}"}
Change Node: (this works if I place this in the data field of the call service node)
{
"message": "HA Notification",
"title": "Garage Door Opened",
"data": {
"actions": [
{
"action": "URI",
"title": "Open Camera",
"uri": "app://com.hualai"
}
]
}
}
Here is the entire flow:
[{"id":"5e978f2a.f835f","type":"inject","z":"c6941a7f.b927e8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":247,"y":326,"wires":[["c51340ba.5c20b"]]},{"id":"c51340ba.5c20b","type":"change","z":"c6941a7f.b927e8","name":"Set msg.payload to Garage Door Open","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload","pt":"msg","to":"{\"message\":\"HA Notification\",\"title\":\"Garage Door Opened\",\"data\":{\"actions\":[{\"action\":\"URI\",\"title\":\"Open Camera\",\"uri\":\"app://com.hualai\"}]}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":597,"y":324,"wires":[["57fd2f81.0cd58","52dc4d93.5ec394"]]},{"id":"52dc4d93.5ec394","type":"api-call-service","z":"c6941a7f.b927e8","name":"Notify Paul to HA","server":"114e3138.c1feaf","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_pixel_4_xl","entityId":"","data":"{\"{{payload}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":887,"y":287,"wires":[[]]},{"id":"57fd2f81.0cd58","type":"debug","z":"c6941a7f.b927e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":860,"y":362,"wires":[]},{"id":"114e3138.c1feaf","type":"server","name":"Home Assistant","legacy":false,"rejectUnauthorizedCerts":false,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]