Hi, thanks, just tested.
this first one results in empty topic
{"message": $join($$.payload.attributes.entities, "\n")}
the tester in nodered returns
Invalid example JSON message:
SyntaxError: Unexpected token $ in JSON at position 12
But... the second one worked
with a change node.
[{"id":"c2ca69f3dbe80770","type":"api-call-service","z":"5c26fb4772d3c08c","name":"Whatsapp","server":"a0eea9da.0fe1d8","version":3,"debugenabled":false,"service_domain":"notify","service":"whatsapp","entityId":"","data":"{\"message\":\"{{payload.attributes.entities}}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":760,"y":380,"wires":[[]]},{"id":"1f76c24e88ac0bea","type":"inject","z":"5c26fb4772d3c08c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":290,"y":440,"wires":[["fc6e9e334e49f3d0"]]},{"id":"fc6e9e334e49f3d0","type":"api-current-state","z":"5c26fb4772d3c08c","name":"Unavailablke sensor","server":"a0eea9da.0fe1d8","version":3,"outputs":2,"halt_if":"2","halt_if_type":"str","halt_if_compare":"does_not_include","entity_id":"sensor.unavailable_entities","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":500,"y":440,"wires":[["80a495f7dd6a26c8"],[]]},{"id":"fc20e36941d596c7","type":"debug","z":"5c26fb4772d3c08c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":750,"y":420,"wires":[]},{"id":"80a495f7dd6a26c8","type":"change","z":"5c26fb4772d3c08c","name":"Clean","rules":[{"t":"set","p":"msg.payload.attributes.entities","pt":"msg","to":"$join($$.payload.attributes.entities, \" \")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":380,"wires":[["c2ca69f3dbe80770","fc20e36941d596c7"]]},{"id":"a0eea9da.0fe1d8","type":"server","name":"GOOD Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]
Except... that whatsapp api built for Home Assistant - or whatsapp API itself doesn't allow the special character... Lots of discussions online about it - tried different things
and %0a notably but none worked ![]()
So I resolved myseld to add 5 spaces in your change node instead of the line break and it's at least much better.
Thanks a lot.