Why Docs has no Markdown import
Google Docs does not parse Markdown natively. Paste raw text and every # becomes a literal hash character, every **word** keeps its asterisks. The only sanctioned path is Apps Script, which exposes DocumentApp—the same DOM the editor uses—so you can write styled paragraphs programmatically rather than hoping for a format conversion.
The core insight is that Docs thinks in paragraph styles and text attribute runs, not markup. A HEADING1 paragraph is not a font-size trick; it is a first-class paragraph type that shows up in the document outline, gets picked up by the table of contents widget, and exports correctly to PDF. Mapping # lines to that type is therefore the right move, not a workaround.