Sync Slack Markdown and HTML with Js Eval

Recipe ToolsDeveloper ToolMarketing

What it does

When someone calls this automation with a conversion type, it transforms content between Slack Markdown and HTML formats. The result is returned immediately so the caller receives the converted output.

Who it's for

Engineering teams who need to convert message formatting between Slack Markdown and HTML in their workflows.

How teams use this

Convert markup emails to Slack format

Transform markup email content into Slack Markdown so messages display correctly when posted to channels. The conversion handles formatting without manual editing.

Prepare Slack messages for web display

Convert Slack Markdown to markup when content needs to appear on a website or web application. The automation ensures formatting translates accurately across platforms.

Add custom formatting rules

Extend the conversion logic to include custom formatting rules or additional markup handling specific to your organization. Set conditions to filter which content types use which conversion path.

How it works

  1. Receive a conversion request. A function call arrives with the conversion type and content to transform, triggering this automation in real time.
  2. Check the conversion direction. Js Eval evaluates the conversion type to determine whether to convert from markup to Slack Markdown or from Slack Markdown to markup format.
  3. Transform the content. Js Eval executes the appropriate conversion code, handling line breaks and formatting rules for the target format based on the direction chosen.
  4. Return the converted result. The transformed content is returned to the caller so downstream systems receive the output in the requested format.