markdown-formatter

n8n node for formatting markdown text and exporting to JSON/MD with structure detection

Package Information

Downloads: 0 weekly / 53 monthly
Latest Version: 0.1.42

Documentation

n8n-nodes-md-formatter

MD Formatter: parse text/markdown/JSON into structured, pretty Markdown and JSON. Supports:

  • Strict repeatable headings (CHARACTER_PROFILE, ## name, ...)
  • Front matter (YAML) to JSON
  • Delimiter splitting (---CHARACTER_START--- / ---CHARACTER_END---)
  • Page number/header cleanup and chapter detection
  • Export: Markdown (binary) and JSON payloads (fieldMapped, sqlIngest)

Install (development)

  • In this repo folder:
    • npm install
    • npm run build

n8n usage

  • Add a Function (or any node) that sets item.json.content to your raw text/JSON/markdown
  • Add "MD Formatter" node after it
    • Source Type: Auto Detect (or JSON/Text)
    • Format Style: Pretty (or Strict)
    • Include Front Matter: optional
    • Detect Structure: true to normalize chapters/remove page numbers
    • Start/End Delimiter: optional to split multiple records
    • Export JSON: true → choose schema (Field-Mapped or SQL Ingest)
    • Export .md File: true → adds binary data with filename

Output:

  • item.json.markdown: formatted Markdown
  • item.json.fieldMapped or item.json.sqlIngest when enabled
  • item.binary.data: the .md file when Export .md File is enabled

Notes

  • Filename auto-generates from name when present (e.g. cormac-finnegan.md)
  • Strict Markdown generator produces machine-friendly # CHARACTER_PROFILE with ## keys

Discussion