Markdown to Social Html Node

Convert markdown to social html

Overview

This node converts Markdown text into social media-friendly HTML using predefined themes. It is useful when you want to transform Markdown content into styled HTML suitable for sharing on social platforms or embedding in web pages with consistent visual themes.

Common scenarios include:

  • Preparing blog posts or social media updates from Markdown drafts.
  • Generating themed HTML snippets for newsletters or websites.
  • Automating content formatting workflows where Markdown input needs to be converted to styled HTML output.

For example, a user can input a Markdown string describing a post and select a theme like "rainbow" or "purple" to generate the corresponding styled HTML snippet automatically.

Properties

Name Meaning
Markdown The Markdown text to convert. This is required and should contain the content to transform.
Theme The visual style/theme applied to the generated HTML. Options include: default, orangeheart, rainbow, lapis, pie, maize, purple, phycat.

Output

The node outputs an array of items where each item contains a json object with the following fields:

  • markdown: The original Markdown input string.
  • theme: The theme used for conversion.
  • result: The resulting HTML string generated from the Markdown input, styled according to the selected theme.

No binary data is produced by this node.

Dependencies

  • This node depends on the external library markdown-to-social-html to perform the Markdown to HTML conversion.
  • No additional API keys or external services are required.
  • No special environment variables or n8n credentials are needed.

Troubleshooting

  • Empty or invalid Markdown input: If the Markdown property is empty or malformed, the conversion may fail or produce unexpected HTML. Ensure valid Markdown syntax is provided.
  • Unsupported theme values: Providing a theme value outside the supported list may cause fallback to a default style or errors. Use one of the documented theme options.
  • Error handling: If an error occurs during conversion, the node either throws an error or, if configured to continue on failure, appends an error object to the output for that item.
  • Common error messages: Errors related to the conversion function typically indicate invalid input or internal processing issues. Verify the Markdown content and theme parameter.

Links and References

Discussion