Does Slack support Markdown tables?
Slack does not support rendering of tables so this markup will not work.
You have two alternatives:
- You can use fields, which will be rendered as 2 columns on most
devices. See
fields
in layout blocks. - You can convert your table into an image (outside Slack) and
attach the image to your message.
No, in fact, Slack doesn't support Markdown in messages¹ at all. It uses its own similar-at-a-glance format called mrkdwn
which has some notable differences with Markdown:
- In Markdown, both
*
and_
are used for emphasis - In Markdown, both
**
and__
are used for bold - In
mrkdwn
*
is used for bold and_
is used for emphasis - Markdown has no syntax for strikethrough (though some implementations have added it, e.g. in GFM which uses
~~
) butmrkdwn
uses~
for strikethrough - Link syntax is very different
mrkdwn
doesn't support headings- Probably more
Don't expect arbitrary Markdown² to work in Slack messages.
¹Slack does support Markdown in posts which can be created using the files.upload
API endpoint setting filetype
to post
.
²Note that tables aren't supported in regular Markdown either. Like strikethrough, some implementations have added these.
Add ``` before and after your table in your str message. it will convert in code block in slack meassge.