Notion MD icon

Notion MD

Node to transform markdown and notion blocks

Overview

This node transforms Markdown text into Notion block objects. It is useful when you want to convert Markdown-formatted content (such as documentation, notes, or blog posts) into a structure compatible with Notion's API or internal data model. For example, you could use this node to automate the migration of Markdown files into Notion databases or pages.

Common scenarios:

  • Importing Markdown notes into Notion.
  • Converting user-generated Markdown content for storage in Notion.
  • Automating workflows that require Markdown-to-Notion conversion before further processing.

Properties

Name Meaning
Input The input to be transformed. Place your markdown or notion blocks here.
Output Key Key to use for the output object. This determines under which key the result will appear.

Output

The node outputs an object where the property name is defined by the Output Key. The value is an array of Notion block objects resulting from the Markdown-to-Notion conversion.

Example output (if Output Key is "output"):

{
  "output": [
    {
      "object": "block",
      "type": "paragraph",
      "paragraph": {
        "text": [
          {
            "type": "text",
            "text": { "content": "Sample paragraph" }
          }
        ]
      }
    },
    // ...more Notion block objects
  ]
}

Note: The exact structure of each block follows Notion's block object format.

Dependencies

  • External Library: Uses @tryfabric/martian for Markdown-to-Notion conversion.
  • No external API keys or n8n credentials are required.

Troubleshooting

  • Operation not implemented: If you select an operation other than "Markdown to Notion," the node will throw an error stating "not implemeted."
  • Unknown operation: If an invalid operation is provided, the node will throw an error: The operation "<operation>" is not known!
  • Input errors: If the Markdown input is malformed or empty, the output may be an empty array or cause unexpected results.
  • Output Key conflicts: Ensure the Output Key does not overwrite existing properties in your data.

Links and References

Discussion