npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-html-to-slack

v0.2.2

Published

n8n community node — converts HTML to Slack mrkdwn

Downloads

84

Readme

n8n-nodes-html-to-slack

An n8n community node that converts raw HTML into Slack-compatible mrkdwn formatted text.


Install

In n8n (recommended)

Go to Settings → Community Nodes → Install and enter:

n8n-nodes-html-to-slack

Manual (custom nodes directory)

cd ~/.n8n/custom
pnpm install n8n-nodes-html-to-slack

Usage

Add the HTML to Slack node to your workflow. Connect any node that produces HTML (e.g. an HTTP Request, a webhook body, or a Gmail node) and map its HTML field to the HTML input.

[Webhook] → [HTML to Slack] → [Slack]

The node outputs all original fields plus a new field (default: text) containing the converted mrkdwn string, ready to pass directly to the Slack Send Message node.


Input / Output Example

Input HTML:

<p>Check out <a href="https://slack.com"><strong>Slack</strong></a> and visit https://n8n.io</p>

Output mrkdwn:

Check out <https://slack.com|*Slack*> and visit <https://n8n.io>

Full HTML → mrkdwn Mapping

| HTML | Slack mrkdwn | |-----------------------------------|-------------------------------------------| | <b>, <strong> | *text* | | <i>, <em> | _text_ | | <s>, <del>, <strike> | ~text~ | | <code> (inline) | `code` | | <pre> | ```\ncode\n``` | | <a href="U">T</a> | <U\|T> (named link) | | <a href="U">U</a> | <U> (text equals href) | | <a href="mailto:x">T</a> | <mailto:x\|T> | | Bare URL in text | <URL> (post-processed) | | <blockquote> | > prefix on each line | | <ul><li> | • item | | <ol><li> | 1. item, 2. item … | | <h1><h6> | See headingStyle option | | <table> | See tableHandling option | | <img> | See imageHandling option | | <br> | \n | | <p> | content + \n\n | | <hr> | ─────────────── | | <div>, <span>, <section> … | Tags stripped, inner text preserved | | HTML entities (&amp;, &lt; …) | Decoded before conversion |


Slack mrkdwn Limitations

Slack's mrkdwn format is a subset of Markdown — several HTML features have no equivalent:

  • No headings<h1><h6> are approximated as bold text
  • No tables — flattened to tab-separated plain text or stripped
  • No inline images — replaced with alt text, a link, or stripped
  • No underline<u> content is preserved as plain text
  • No text coloursstyle attributes are ignored
  • All URLs must use angle-bracket syntax — bare URLs are not reliably auto-linked when posted via the API; this node wraps them automatically

Options Reference

| Option | Values | Default | Description | |-------------------|-------------------------------------------------|---------------|--------------------------------------------------------------| | headingStyle | bold | boldWithSeparator | strip | bold | bold*text*; boldWithSeparator adds a ─── divider; strip removes headings entirely | | tableHandling | plainText | strip | plainText | plainText flattens cells tab-separated; strip removes the whole table | | imageHandling | altText | asLink | strip | altText | altText uses the alt attribute; asLink wraps src as <url>; strip removes the image | | trimWhitespace | true | false | true | Collapses 3+ consecutive newlines to a single blank line and trims the result |


Development

# Clone and install
git clone https://github.com/<you>/n8n-nodes-html-to-slack.git
cd n8n-nodes-html-to-slack
pnpm install

# Unit tests (vitest, no n8n required)
pnpm test

# Hot-reload dev server (starts local n8n with this node loaded)
pnpm dev

# Type-check + build
pnpm run build

# Lint
pnpm run lint

File structure

nodes/HtmlToSlack/
├── HtmlToSlack.node.ts   — n8n integration layer
├── HtmlToSlack.node.json — codex / search metadata
├── htmlToMrkdwn.ts       — pure conversion logic (zero n8n deps)
├── htmlToMrkdwn.test.ts  — vitest unit tests
└── htmlToSlack.svg       — node icon

htmlToMrkdwn.ts has no n8n imports and can be used as a standalone library outside of n8n.


License

MIT