The problem is with the last line. Single quotes does not work (unexpected " error) and I have tried to use scape char \ before the double quotation but, then, the behind application does not work saying that double quotation is required ("Call-service API error. Error Message: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)").
If I make the call-service from HA, there is no problem but I would like to use it in Node-red.
Hi Steve, thanks, interesting aproach. Sorry I am newby with Node-Red. I have tried both proposed solutions but still not working. It seems like I need to send a JSON string inside other JSON but I do not know if it is possible. The result of the json node is:
Thanks Steve. Finally I get it working but your answer put me on the track. The problem was the formatting of the message, I need to put data: and the media_content_id is a string. Here it was the correct format: