Hi, I have a message sent to my email with a body of text(in html) format. When I view the complete message with debug it shows the following:
How can I get this in a readable form to extract the important components?
I have tried using a "html" node like follows:
But this doesn't return what I wish. I'd like to remove the "br"s between the text parts so I can put it into the msg.payload.
The brs don't stop you putting it into the payload. If you remove them you will just have a long string with them removed. What exactly do you want to end up with?
in theory msg.html should contain the html version and msg.payload the plain text version - but that will depend on the sending end and it's not always the case (but worth checking). As noted you could use the html node - but you could also use the split node (which would produce a series of messages rather than one array) - or a change node to replace <br/> . or a function node with a small bit of code to slice it however you like.