Convert to File node issue

Hello,
I am trying to create a workflow to convert an HTML to PDF, I did some research and I decided to use Gotenberg (source here: Generating PDFs with N8N using Gotenberg )
The issue is the toggle “Data in Base64” doesn’t exist, my n8n version is the latest, I tried both using the cloud version and self-hosted version using docker compose.
Could you please assist further, what might be the issue?

Thank you so much!!

Hi @Kaouthar_Bousbaa,

It looks like the article you’re referencing is a bit out of date. Could you try using the Convert to File node instead, as described here: Convert to File | n8n Docs and specifically the Move Base64 String to file option mentioned here:

1 Like

Thank you!! I tried this, but the issue is that in the Convert to File node (Move Base64 String to File), the output is in base64, that’s why I am looking for a toggle to disable it.

Convert to File node with the “Move Base64 String to File” operation in n8n is designed to take a Base64 string and output it as a binary file. The output is stored in the binary property of the item, not as another Base64 string. There is no toggle or option to “disable” base64 output, because the node’s output is already in binary format for use in downstream nodes, what you may see as base64 in the UI is just how n8n displays binary data for inspection, not how it is handled internally or passed to other nodes.

If you are seeing base64 in the output, it is likely just the UI representation.

1 Like

Hello @Kaouthar_Bousbaa

If I understand your problem correctly, you want to convert an HTML string into a valid HTML file,

To do that, you first need to convert the HTML string to Base64 using .base64Encode(), because the Convert to File node expects Base64 data in its input field,

Here’s a simple example of how to do it:

2 Likes

Hi @Kaouthar_Bousbaa,

You’re absolutely right, the “Data in Base64” toggle that used to appear in older versions of n8n (or in the older Gotenberg examples) is no longer available in the latest releases.

Now n8n handles binary data differently. When you use the Convert to File node with the Move Base64 String to File option enabled, the output automatically becomes a binary file. You don’t need to manually toggle or disable Base64, the node already converts the Base64 string into a file format that can be passed directly to the next node (like HTTP Request or Gotenberg).

If you’re still getting Base64 output, please double check that the input data key you’re converting is the correct one (for example, data, html, or whatever field contains your HTML string). Also make sure you’ve connected the Convert to File node directly before sending the file to Gotenberg.

If you’d like, I can share a small example workflow that converts HTML → PDF using Gotenberg with the latest n8n version.

Thanks!

1 Like

Thank you so much!! It works now, using your workflow I could convert the HTML to an HTML file!

But when I tried to connect the Convert to File node to the HTTPs node, I go t an error:

Apparently, it’s expecting a file named index.html, and as you can see, it’s configured correctly in the previous node. Am I doing something wrong?

Thank you!

Don’t use expression when you declare the Input data field name.

Just type as text the orange description of the file, from result of previous node.

If is not working try change from index.html to something without the . dot.

1 Like

Thank you, I used ‘fixed’ option instead and then I typed again the ‘index.html’ – didn’t work. Then I changed the name to something without the dot, and it returns the same error:

Bad request - please check your parameters

Invalid form data: form file ‘index.html’ is required

Any suggestions?

try change the html file name to index.html also the input to index.html all the same,
probably Gotenberg need the file name to be index.html

1 Like

Thank you so much!!

It works now!

1 Like