How do I save a HTML content as .html in Google Drive (without messing up formatting)?

:bullseye: What is your goal?

I have a OpenAI module that takes an article outline and generates a full article formatted in HTML. However, when I try to save it to Google Drive using “Create file from text” it always names it as article-name.html.txt. No matter what I write it puts .txt on the end.

:thinking: What is the problem & what have you tried?

  1. Using Drive’s Create file from text doesn’t work - it always puts .txt at the end.
  2. Using Google Drive’s rename a file doesn’t work - if I tell it to rename abc.html.txt to “abc.html” it will rename it to “abc.html.html.txt” - it keeps the extension it had before
  3. If I use Google Drive’s Upload a File, I can get the file extension to save as .html but the HTML content formatting gets completely messed up.
  4. Tried to use Google Cloud with service account/API key, OAuth 2.0 in the “HTTP Request” module but no matter how I configured it, couldn’t get it to work.

Any ideas? I just want to either:
(A) Save the html_content from the OpenAI’s json object output as article-name.html while preserving the formatting.
(B) Also if there’s a way to rename a file from abc.html.txt to abc.html without messing up the formatting, that will work to.

Hello,

Welcome to the community!

The solution to your problem is extremely simple.
Map HTML output into “Data” and… that’s it.

Please take a look at the attached screenshot and scenario shared link.