---
title: "Google Doc to clean HTML converter for Google Apps Script"
author: "Martin Hawksey"
date: 2020-09-11T14:32:51+00:00
modified: 2020-09-11T14:59:44+00:00
canonical_url: https://pulse.appsscript.info/p/2020/09/google-doc-to-clean-html-converter-for-google-apps-script/
markdown_url: https://pulse.appsscript.info/p/2020/09/google-doc-to-clean-html-converter-for-google-apps-script.md
categories:
  - "Docs"
  - "Snippet"
  - "Solutions"
tags:
  - "GitHub"
  - "thejimbirch"
description: "Following on from our previous post highlighting Amit Agarwal's Send Rich Text HTML Emails with Google Sheet  we received the following recommendation for a Google Doc to HTML converter solution from @IMTheNachoMan"
---

# Google Doc to clean HTML converter for Google Apps Script

> Export Google Doc as clean html. Handy to make a WordPress post from Google Doc. – thejimbirch/GoogleDoc2Html

Following on from our previous post highlighting [Amit Agarwal’s Send Rich Text HTML Emails with Google Sheet](https://pulse.appsscript.info/p/2020/09/send-rich-text-html-emails-with-google-sheet-digital-inspiration/)  we received the following recommendation for a Google Doc to HTML converter solution from @IMTheNachoMan:

> Great work! I also recommend checking out [https://t.co/omjoX8cynI](https://t.co/omjoX8cynI) which can be modified to send HTML emails from a Google Document. That is how I used to manage all of our automation’s emails — template files in Google Doc that were converted to HTML for email.
> — IMTheNachoMan (@IMTheNachoMan) [September 10, 2020](https://twitter.com/IMTheNachoMan/status/1304203466022289409?ref_src=twsrc%5Etfw)

For those interested in workflows for using Google Docs as an email template this solution already has a `emailHtml()` function you can build on which appears to already inline images from your Google Doc.

Source: *[thejimbirch/GoogleDoc2Html*](https://github.com/thejimbirch/GoogleDoc2Html)

---

*Published by [Martin Hawksey](https://pulse.appsscript.info/p/author/admin/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2020/09/google-doc-to-clean-html-converter-for-google-apps-script/](https://pulse.appsscript.info/p/2020/09/google-doc-to-clean-html-converter-for-google-apps-script/)*
