Overview
This node converts Markdown text into Slack Block Kit format, which is a structured JSON format used by Slack to render rich message layouts. It is useful when you want to transform Markdown content into Slack-compatible blocks for sending messages via Slack APIs or workflows.
Common scenarios include:
- Preparing user-generated Markdown content for posting in Slack channels.
- Automating the conversion of documentation or notes written in Markdown into Slack messages.
- Integrating Markdown-based content management systems with Slack notifications.
For example, if you have a Markdown string like:
# Hello World
This is *italic* and this is **bold**.
The node will convert it into an array of Slack Block Kit blocks that represent the same formatting visually in Slack.
Properties
| Name | Meaning |
|---|---|
| Markdown Text | The Markdown text to convert to Slack Block Kit format. Supports multiline input. |
| Continue on Fail | Whether to continue processing subsequent items if the conversion fails for one item. |
Output
The node outputs an array of items, each containing a json object with the following structure:
blocks: An array representing the Slack Block Kit formatted blocks converted from the input Markdown text. This can be directly used in Slack API calls to send rich messages.- If
Continue on Failis enabled and an error occurs during conversion, the output item will also include:markdownText: The original Markdown input.error: A string describing the error message encountered.
No binary data is produced by this node.
Example output JSON snippet:
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Hello World*"
}
}
]
}
Dependencies
- Uses the external library
@tryfabric/mackfor converting Markdown to Slack Block Kit format. - No additional credentials or environment variables are required.
Troubleshooting
- Empty Markdown Text: If the "Markdown Text" property is empty, the node throws an error indicating the parameter is empty. Ensure the input contains valid Markdown text.
- Conversion Errors: If the Markdown contains unsupported syntax or causes parsing issues, the node may throw errors. Enabling "Continue on Fail" allows the workflow to proceed while capturing the error message in the output.
- Multiline Handling: The node replaces escaped newline characters (
\n) with actual newlines before conversion. Improperly formatted input might affect the output.