HTML-to-Text Issues: Is this (Scenario #3) the only way to make it work?

Hey guys,

I was having issues formatting HTML content to texts. I’ve tried many different approaches and managed to make Scenario #3 work but since I’m not a programmer and I’m learning n8n, I thought I should reach out to the awesome community here. Here are a few questions:

  1. Scenario #3 works, but it shouldn’t be this hard? Is this the only way to make it work?
  2. Scenario #2 seems to work better out-of-the-box than #1, am I missing something?
  3. Is there a way to make Scenario #4 work?

JSON file URL: Google Docs: HTML-to-Text scenarios
Workflow URL: n8n.io: HTML-to-Text scenarios
Note: Can’t seem to share the workflow’s code. It’s returning a 422 error.

Scenario #1: Directly using the n8n’s HTML node/module. (Note that the content I’m parsing doesn’t actually have full HTML structure)

  1. Seems to mess up spacing from the presence of HTML tags and \n
  2. Seems to only format these HTML character entities (HTML Character Entities), but not others like " or &.
  3. Didn’t remove 2 or more whitespaces.

Scenario #2: Using MAKE’s HTML node/module via webhooks

  1. Didn’t mess up spacing from the presence of HTML tags and \n
  2. Seems to also format these HTML character entities (HTML Character Entities), but not others like " or &.
  3. It removed 2 or more whitespaces.

Scenario #3: Using expressions to modify all the strings
It works but it shouldn’t be this hard?

Scenario #4: Trying to retrieve the full HTML structure for processing
I suspect maybe the HTML module is better if it actually processes content with full HTML structure, but I can’t get it to work. Seems like the string/text that I managed to retrieve (with “never error”) is not actually HTML (by intention).

Thanks a bunch!
Neo

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hey Neo,

Can you share some sample html and a sample of what you would want it parsed down to?
Also please share how your getting the html.

If you can post the workflow that you have too that would be helpful.
You can select all nodes then copy. Paste it in between two ``` symbols in the reply (or press cmmd/ctrl + e).

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