Slack: send a HTML message

Describe the issue/error/question

Sending a message to slack works, but my HTML tags are not rendered in slack app

What is the error message (if any)?

No error message

Please share the workflow

image

Information on your n8n setup

  • n8n version: 0.167.0
  • Database you’re using: SQLite
  • Running n8n via: npm

Hey @sscarduzio,

I don’t think Slack supports HTML in messages, have you tried using markdown instead?

1 Like

OMG thanks for pointing this out. I ended up sending “mrkdwn” typed JSON blocks.

	[{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": {{JSON.stringify($node["FormatMD"].json["payload"] ) }}
			}
	}]

The JSON.stringify helped with unescaping the string content.
Notably, their markdown is a shitty subset of the actual markdown. So better try things out manually on Slack, get the formatting right, and then save that to n8n.

1 Like