NEON DEER DATA LABS Search documentation...

neondeerdata.com

Step · Transform

Convert HTML to markdown

Converts HTML, such as an email body, into markdown text.

Inputs

LabelKeyTypeRequiredNotes
HTML html Text Yes Plain text is also accepted.

Outputs

LabelKeyTypeAlways setNotes
Markdown markdown Text Yes Can be empty.

How it behaves

  • Parses with HTML5 error recovery, sanitizes (GitHub allowlist plus tables), then writes GitHub-flavored markdown.
  • Removes script, style, svg, head, title, meta, link, noscript, iframe, object, embed and template elements, and elements hidden with inline display:none, visibility:hidden, mso-hide:all, opacity:0 or the hidden attribute.
  • Images become [Image: alt](url) links (inside a link, only the label text is kept). cid: and data: images and tracking pixels of 1px or less are dropped.
  • Layout tables (role="presentation", or no header cells or caption) are flattened; data tables become markdown tables.
  • Links keep only http, https, mailto and tel schemes; others become plain text. Inline-style bold and italic on span/font are kept.

Limits and constraints

  • Input up to 1,000,000 characters.

Errors

Fails when

  • Empty: HTML is required.
  • Too long: HTML is too large to convert (over 1,000,000 characters).
  • Parser failure: The HTML could not be converted (malformed or too deeply nested).

For errors that every step can return, see Troubleshooting.

Notes

  • Hiding done with stylesheets or classes is not detected; only inline styles are.

Example

Clean up an HTML email body before saving it as a note.

Example inputs
InputValue
HTML
<p>Hi <b>Sam</b>, see <a href="https://acme.com/terms">our terms</a>.</p>
<img src="https://track.example/p.gif" width="1" height="1">
Example outputs
OutputValue
Markdown
Hi **Sam**, see [our terms](https://acme.com/terms).

The 1px tracking image is dropped.