Markitdown icon

Markitdown

Convert any file into markdown

Overview

This node, named "Markitdown," converts any input file into a Markdown (.md) format. It is useful when you have files in various formats and want to transform their content into Markdown for easier readability, documentation, or further processing within your workflow.

Typical use cases include:

  • Converting rich text documents or other file types into Markdown for integration with static site generators.
  • Transforming files to Markdown to standardize content formatting before publishing.
  • Automating documentation generation by converting source files into Markdown format.

Properties

Name Meaning
Input Binary Field The name of the binary property that contains the file to be processed (e.g., "data").

Output

The node outputs an array of items where each item has the following structure:

  • json.data: A string containing the Markdown content converted from the input file.
  • binary: An empty object (no binary data is output).

Thus, the main output is the Markdown text representation of the original file.

Dependencies

  • Requires the external command-line tool markitdown to be installed and accessible in the system's PATH. This tool performs the actual conversion from the input file to Markdown.
  • Uses temporary files to write the input binary data and read the resulting Markdown output.
  • No specific n8n credentials are required, but the environment must allow execution of shell commands.

Troubleshooting

  • Common issues:

    • If the markitdown CLI tool is not installed or not found in the PATH, the node will fail when trying to execute the conversion command.
    • Input binary field name mismatch: Ensure the specified binary property exists and contains valid file data.
    • Permission issues writing temporary files may cause failures.
  • Error messages:

    • Errors related to missing markitdown executable typically indicate it is not installed or not accessible.
    • File read/write errors suggest permission or path issues with temporary directories.
    • Invalid binary data errors occur if the input binary field does not contain proper file data.
  • Resolutions:

    • Install the markitdown CLI tool on the host machine.
    • Verify the input binary field name matches the actual binary property name.
    • Check file system permissions for temporary directories used by the node.

Links and References

Discussion