Convert Markdown to HTML
The "Convert Markdown to HTML" step allows you to transform content written in Markdown syntax into properly formatted HTML. This is useful for converting simple text-based documents into web-ready content that can be published on websites, blogs, or integrated into content management systems.
How to Configure the Convert Markdown to HTML Step
Configuring the step requires setting the parameters shown below:
[IMAGE: Screenshot of the Convert Markdown to HTML step configuration panel]
Markdown Text
Enter the Markdown content that you want to convert to HTML. This can be a simple text string or complex Markdown with headings, lists, links, and other formatting elements.
You can use Liquid syntax to dynamically reference Markdown content from a previous step:
Advanced Options (Optional)
HTML Wrapper
Choose whether to include a full HTML document structure:
Basic Conversion: Converts only the provided Markdown to HTML elements without adding
<html>
,<head>
, or<body>
tagsFull HTML Document: Wraps the converted content in a complete HTML document structure with proper DOCTYPE, html, head, and body tags
Additional CSS (Optional)
Add custom CSS styles that will be included in the converted HTML. This is particularly useful when choosing the "Full HTML Document" option, as the styles will be properly included in a <style>
tag within the <head>
section.
Output Format
The Convert Markdown to HTML step returns a string containing the HTML version of your Markdown input:
If you selected the "Full HTML Document" option, the output would look like:
[IMAGE: Screenshot showing an example of the Convert Markdown to HTML results in the AirOps interface]
How to Use the Results
You can access the HTML content in subsequent workflow steps using Liquid syntax:
Since the output is a string containing HTML, you can pass it directly to steps that require HTML content, such as:
Web page creation steps
Email body content
CMS integration steps (Webflow, WordPress, etc.)
Common Use Cases
Converting markdown blog posts to HTML for web publishing
Transforming structured text content into rich HTML emails
Preparing documentation for web display
Converting user-generated markdown content to HTML
Creating consistent HTML format from standardized markdown templates
Preparing content for CMS imports
How to Continue if the Conversion Fails
By default, the Convert Markdown to HTML step will terminate the workflow if it fails. To continue the workflow if the step fails, click "Continue" at the bottom of the settings panel.
[IMAGE: Screenshot showing the "Continue" option in the step settings]
The step will return the following keys when it fails:
output
: this will benull
error
:message
: the message returned from the stepcode
: the error code representing the error
Common error causes include malformed Markdown syntax or processing errors.
Example Workflow
Here's a common pattern using the Convert Markdown to HTML step:
Use an LLM step to generate blog content in Markdown format
Use the "Convert Markdown to HTML" step to transform the content to HTML
Use a "Web Page Scrape" step to get the current website's styling
Use an LLM step to ensure the HTML matches the website's style conventions
Use a CMS integration step (like "WordPress" or "Webflow") to publish the HTML content
This workflow enables efficient content creation in markdown (which is easier to generate with LLMs) and seamless conversion to web-ready HTML that can be published directly to your website or content management system.
Last updated
Was this helpful?