Convert to file node, converting to html

@Jon, @MutedJam May I have your attention? Looks like a bug.

I encounter duplicated content issues when attempting to save HTML using this node.

There is how it’s looks like when I open saved index.html file

To be clear I just generated sample html by HTML generate Node and convert it to the file. Here is what I got.

May be I am doing wrong something?

Information on your n8n setup

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

Hi @Ruslan_Yanyshyn, I am sorry for the trouble.

I believe what’s happening here is that you are essentially creating HTML twice. The “Convert to HTML” operation of the “Convert to File” will try to generate an HTML table based on the input data. However, in the example case you have described the input data is already an HTML data structure.

n8n used to have a “Move Binary Data” node that would allow you to simply write raw text data into a file, but it seems that’s no longer possible using the Convert to File node :cry:

So my suggestion here would be to instead copy the good old “Move Binary Data” node from an older n8n version. It can no longer be added through the menu in newer n8n versions, but it’ll still work if you simply copy it from elsewhere.

Here’s an example workflow (from which you can also copy the aforementioned node):

Hope this helps :slight_smile:

3 Likes

So @Jon just hinted this is still possible using the new “Convert to File” node as well, although it’s hidden behind the base64 operation of the node. Here’s an updated example workflow:

1 Like

Thank you! I was searching for the ‘Move Binary Data’ node but, as you mentioned, it’s no longer available in new versions of n8n. Now it’s difficult to figure out how to save the file because this feature is hidden under the base64 operation, which might be confusing for people with less programming experience.

1 Like

I’m 100% with you here, it was really onfusing for me as well :see_no_evil:. I sure hope we’ll improve the visibility of this functionality again.

I just tested both solutions and the newest one doesn’t work actually.
I got file which contain this à“ñ!¶ia¶iay§fzÖœ…ªìz`.

1 Like

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