HTML to Markdown
Converts HTML content to Markdown format using the html-to-markdown library.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- HTML Content - HTML text to convert to markdown. Can be provided directly as text, from a file, or from a URL depending on the Input Mode setting.
Options
- Input Mode - Choose the source for HTML content:
- Text - HTML content is provided directly in the input field
- File - HTML content is read from a file at the specified path
- URL - HTML content is fetched from a web URL
- Output Mode - Choose the destination for converted markdown:
- Text - Markdown is returned as output
- File - Markdown is saved to a file at the specified path
- Output File Path - File path to save markdown when Output Mode is File
- Proxy Settings - Configure proxy for URL-based requests:
- No Proxy - Direct connection
- Manual Proxy - Use specified proxy address
- Robomotion Proxy - Use Robomotion's proxy service
- Proxy Address - Proxy server address when using Manual Proxy
- Proxy Authentication - Authentication method for proxy:
- No Authentication - No authentication required
- Basic Authentication - Username/password authentication
- Proxy Credentials - Credentials for proxy authentication when using Basic Authentication
- Skip TLS Verification - Skip SSL/TLS certificate verification for HTTPS connections
Output
- Markdown - The converted markdown text from the HTML input.
How It Works
The HTML to Markdown node converts HTML content to Markdown format. When executed, the node:
- Retrieves the HTML content based on the Input Mode setting:
- Text mode: Uses the HTML content provided directly
- File mode: Reads HTML content from the specified file path
- URL mode: Fetches HTML content from the provided URL
- Processes the HTML through the html-to-markdown library to convert it to Markdown
- Outputs the converted Markdown text
- If Output Mode is set to File, also saves the Markdown to the specified file path
Requirements
- For File mode: Valid file path with readable HTML content
- For URL mode: Valid URL accessible from the execution environment
- For proxy usage: Valid proxy configuration when needed
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid HTML Content input
- File does not exist when using File mode
- Input path is a directory instead of a file
- Unable to read file when using File mode
- Unable to fetch URL when using URL mode
- HTTP error when fetching URL
- Unable to read response body from URL
- Invalid proxy address format
- Empty username or password for proxy authentication
- Unable to write output file when using File mode
Usage Notes
- The node supports multiple input methods for flexibility
- Proxy settings are only used when Input Mode is set to URL
- When using URL mode, ensure the target server is accessible
- File paths should be absolute or relative to the execution environment
- Output file path will be created if it doesn't exist, but directory must exist
- TLS verification should only be skipped in trusted environments