Slack Block Kit ordered and unordered lists?

4.1k Views Asked by At

I'm experimenting with the Slack Block Kit, that supports markdown syntax. I'm trying to insert a numbered or bulleted list into the editor and can't seem to figure out how that works. Is there any way to achieve this?

Here is an example payload:

{
    "blocks": [
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "1  asjdfljasd 1 asdfkjasdf " <- should be a numbered list
            }
        },
    ]
2

There are 2 best solutions below

1
On

The answer is that there isn't support for Markdown lists. Source:

There's no specific list syntax in app-published text, but you can mimic list formatting with regular text and line breaks

0
On

Slack's templates for Block Kit had an unordered list. They used the unicode character • (hex 0x2022) instead of markdown. Markdown does not appear to work in blocks for lists.

"text": {
  "type": "mrkdwn",
  "text": "• Item 1\n• Item 2\n• Item 3"
}

Ordered lists would need you to type in the numbers unfortunately:

"text": {
  "type": "mrkdwn",
  "text": "1. Item 1\n2. Item 2\n3. Item 3"
}