I wanted to wring a mail merger in google apps scripts. I know there are free and paid mail merger options but I wanted to use a script so I can give other users the ability to use an administrative account without having to give them full access to it.
I’m using a google doc as a template to build a mail merger. and using the code found in this SO response and all was working ok.
I noticed that the template would not show any bullets and as I was updating the template and testing different options (like tables) I notice that when adding a simple table to my google doc template the template would stop be rendered with proper formatting (no colors, no bolding, etc) after converted to html.
I looked up the problem in google and SO, and I came up with this result: text which appears to address the formatting by going through some of the css that gets exported, but when I implemented that solution in my code it would not work (the only that seem to be fixed is the layout but the rest of coloring, bolding and other visual queues used in the documento for emphasis would not be kept.
I did my best to compare a working html exported and no-format html resutling from the converstion, but I couldn’t figure out what to change or how to change it and this may require a more expert approach to properly sort out what is missing that leads to having improper html as a result of the export.
here’s the test file if someone might want to give it a shot: https://docs.google.com/document/d/1e4IbjLLHZrnHECe8XjZxR-yhMDu3PoX0oIdOXPu9y1w/edit?usp=sharing
if I add a table like the test table there, it would damage the html export somehow so I had to resort to not use a table there when putting up a list in that section.
rather than having code to fix the issue like the solution above, what I really would like some help with is to know and understand what breaks the html when adding an element that would break the html export so I can prevent it if I can when drafting my template as a google doc, which is what I still intend to do moving forward.