Passing msg.payload or msg.data to Notification

Hello.

Trying to set up notification after a get entity state, where it dynamically puts the output of $msg.payload, and $msg.data into this format. However the notify doesn’t recognize the information getting passed to it.

I tried using the template node to format it this way, which works in a debug output. However I can’t then get the notify node to accept {{msg.payload}} as the “data” field.

Any suggestions?

{
“message”: {{msg.data}},
“title”: {{msg.payload}}
}

I’m no expert, but try (notice the quotes):

{
“message”: “{{data}}”,
“title”: “{{payload}}”
}

It’s always better to post more of what you have to make sure there is no confusions of how your sequence is set up.

But

{
  "message": msg.data,
  "title": msg.payload
}

Works if everything else is correct.

1 Like