What is the Convert to HTML/Markdown Block?
The Convert to HTML/Markdown block transforms content between HTML and Markdown formats. Use it to convert web content for display, prepare content for publishing, or process scraped data into readable formats. Common use cases:- Convert Markdown content to HTML for web publishing
- Transform HTML from web scraping into clean Markdown
- Format LLM-generated Markdown for email or web display
- Clean up HTML content by converting to Markdown and back
- Prepare content for different platforms (CMS, email, documentation)
- Extract readable text from HTML pages
- Format structured content for Google Sheets
How Does the Convert to HTML/Markdown Block Work?
- Provide content - Enter HTML or Markdown content (or reference previous steps)
- Select conversion direction - Choose to convert to HTML or Markdown
- Block processes - Converts content to the selected format
- Returns converted output - Clean HTML or Markdown ready to use
Configuration
Content (Required)
Enter the HTML or Markdown content you want to convert. Static content:{ } icon to insert placeholders from previous steps or inputs.
Convert to
Select the output format. Options:-
HTML: Converts Markdown to HTML
- Use when: Publishing to web, sending HTML emails, formatting for CMS
-
Markdown: Converts HTML to Markdown
- Use when: Cleaning scraped content, making HTML readable, preparing for text processing
Error Handling
Define what happens if the conversion fails. Options:- Terminate Workflow: Stop execution immediately
- Continue Execution: Proceed to next step with empty output
Use Cases and Examples
Use Case 1: Convert Markdown to HTML for Web Publishing
Scenario: Convert LLM-generated Markdown content to HTML for a blog post Configuration:- Content:
{{step_3.output}} - Convert to: HTML
Use Case 2: Convert HTML to Markdown for Readability
Scenario: Clean up web-scraped HTML content into readable Markdown Configuration:- Content:
{{step_2.output}} - Convert to: Markdown
Use Case 3: Format Content for Email
Scenario: Convert Markdown report to HTML for email sending Configuration:- Content: Template with Liquid syntax
- Convert to: HTML
Use Case 4: Extract Clean Text from Scraped HTML
Scenario: Convert complex HTML from web scraping to clean Markdown Configuration:- Content:
{{step_5.output}} - Convert to: Markdown
Use Case 5: Prepare Markdown for CMS
Scenario: Convert Markdown content to HTML for WordPress or other CMS Configuration:- Content: Combined content from multiple steps
- Convert to: HTML
Use Case 6: Clean HTML Tables to Markdown
Scenario: Convert HTML table data to Markdown format Configuration:- Content:
{{step_1.output}} - Convert to: Markdown
Use Case 7: Format Documentation
Scenario: Convert Markdown documentation to HTML for knowledge base Configuration:- Content: Static Markdown with formatting
- Convert to: HTML
Best Practices
Converting to HTML
- Use for publishing: Convert Markdown to HTML when content goes to web, email, or CMS
- Preserve formatting: Markdown supports headers, lists, links, emphasis, code blocks, tables
- Check output: HTML includes proper tags (
<h1>,<p>,<ul>,<a>, etc.) - Combine with APIs: Use HTML output for API calls or webhook payloads
Converting to Markdown
- Clean scraped content: HTML to Markdown removes styling and classes
- Improve readability: Markdown is cleaner for storage and processing
- Prepare for LLMs: Many LLMs work better with Markdown format
- Save to sheets: Markdown is more readable in Google Sheets than HTML
Content Handling
- Test conversions: Run workflow to verify output format
- Use Liquid carefully: Template syntax processes before conversion
- Handle special characters: Markdown uses
*,_,#- escape if needed in HTML - Preserve links: Both directions maintain links properly
Common Patterns
Markdown to HTML for email:Troubleshooting
Conversion Output Not as Expected
Problem: HTML/Markdown output doesn’t look right. Solution:- Check input format is valid HTML or Markdown
- Test with simple content first
- Verify Liquid placeholders resolve correctly
- Use Text block to inspect input before conversion
Liquid Variables Not Rendering
Problem: Output shows{{step_1.output}} instead of actual data.
Solution:
- Verify step number is correct
- Ensure previous step completed successfully
- Check step has output data
- Test reference in Text block first
Special Characters Breaking Format
Problem: Characters like*, _, # cause issues.
Solution:
- When converting to Markdown: These are Markdown syntax
- When converting to HTML: Escape special HTML chars if needed
- Use Code block for complex escaping if required
Tables Not Converting Properly
Problem: HTML tables to Markdown or vice versa don’t format correctly. Solution:- Ensure HTML tables use proper
<table>,<tr>,<td>structure - Markdown tables need pipe separators:
| Column | Column | - Add header separator:
|--------|--------| - Test with simple table first
Links Lost in Conversion
Problem: Links disappear after conversion. Solution:- HTML links need proper
<a href="">format - Markdown links need
[text](url)format - Check for malformed HTML/Markdown in input
- Verify links in Text block before conversion
Comparing with Other Blocks
Use Convert to HTML/Markdown when:- You need to change content format (HTML ↔ Markdown)
- Converting web content for processing
- Formatting for specific platforms
- Clean HTML from web scraping
- Formatting with Liquid only
- No HTML/Markdown conversion needed
- Simple text formatting and combination
- Complex transformations required
- Custom parsing logic needed
- Multiple format changes
- Advanced text processing
What’s Next
Now that you understand the Convert to HTML/Markdown block:- Format text with Text Block
- Process data with Code Block
- Create structured data with Convert to JSON
- Scrape web content with Web Scrape
- Generate content with LLM Block
- Learn Liquid Templating for dynamic content
- Learn about Variable Referencing