Issues with data extraction and formatting output

I am trying to extract text out of my email and keep the formatting that the text is in. But my code node doesn’t seem to be working correctly. It keeps adding tons of spaces and return line breaks. So the formatting is messed up.

Here is what it is outputting.

Here is what I want it to look like.
image

The email looks like this.

Here is my workflow. Maybe someone can help me fix the code so it will output correctly.

Information on your n8n setup

  • n8n version: 1.37.3
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker Install on Zimaboard
  • Operating system: CasaOS

Hey @jlhsolutions,

What happens if you use the Text option instead of HTML? We do try to hide / remove some HTML aswell to make the output easier to work with.

@Jon I don’t see a text option. Is that something that is hidden or do I use code to convert it to text?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.