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
markitdownto 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
markitdownCLI 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.
- If the
Error messages:
- Errors related to missing
markitdownexecutable 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.
- Errors related to missing
Resolutions:
- Install the
markitdownCLI 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.
- Install the
Links and References
- [markitdown GitHub repository or official page] (Please add the actual URL if known)
- n8n Documentation on Working with Binary Data
- Node.js
child_process.execdocumentation: https://nodejs.org/api/child_process.html#child_processexeccommand-options-callback