Actions9
Overview
This node, named "LLM文档转换" (LLM Document Conversion), is designed to convert various document formats into Markdown text using a large language model (LLM) friendly format. It supports multiple file types such as PDF, Word documents, Excel spreadsheets, PowerPoint presentations, HTML, CSV, XML, and JSON. The specific operation "Word转Markdown" converts Word files (.doc, .docx) into Markdown format.
Common scenarios for this node include:
- Automating the conversion of Word documents into Markdown for easier editing or publishing on platforms that support Markdown.
- Integrating document processing workflows where Markdown output is required for further content manipulation or storage.
- Extracting textual content from Word files in a clean, structured Markdown format for documentation or knowledge base systems.
Example use case: A user uploads a Word document containing meeting notes and wants to convert it into Markdown to publish on a company wiki automatically.
Properties
| Name | Meaning |
|---|---|
| 文件字段名 | The name of the input file field containing the document to convert. Supported formats include pdf, doc, docx, ppt, pptx, xlsx, html, csv, etc. Default is "data". |
| 返回Markdown文本 | Boolean option indicating whether to return the Markdown text content directly. If disabled, only the URL of the converted document is returned. Default is true. |
Output
The node outputs JSON data containing the result of the conversion. When the "返回Markdown文本" property is enabled, the output includes the Markdown text extracted from the Word document. If disabled, the output provides a URL pointing to the converted Markdown document instead.
If binary data is involved (e.g., the original file or converted document), it would typically be handled separately, but based on the provided code and properties, the main focus is on returning Markdown text or a URL.
Dependencies
- Requires an API key credential for accessing the LLM document conversion service.
- The node uses a base URL configured via credentials to send requests to the external document conversion API.
- No other external dependencies are indicated in the source code.
Troubleshooting
Common issues:
- Unsupported file format errors if the input file is not one of the supported types.
- Authentication failures if the API key or base URL credentials are missing or incorrect.
- Network or API errors if the external service is unreachable or returns an error.
Error messages and resolutions:
- "Invalid file format" — Ensure the input file is one of the supported types (pdf, doc, docx, ppt, pptx, xlsx, html, csv, etc.).
- "Authentication failed" — Verify that the API key credential and base URL are correctly set up in n8n.
- "Conversion failed" or HTTP errors — Check network connectivity and the status of the external API service.
Links and References
- No direct links provided in the source code. For more information, consult the documentation of the external LLM document conversion API used by this node.