Skip to main content

Markdown block

Fields

FieldTypeDescriptionRequired?
typeStringThe type of block. For a markdown block, type is always markdown.Required
textStringThe standard markdown-formatted text. The cumulative limit for all markdown blocks in a single payload is 12,000 characters.Required
block_idStringThe block_id is ignored in markdown blocks and will not be retained.Optional

The following are supported markdown types.

Markdown TypeExampleResult
Bold**this is bold** or
__this is bold__
this is bold
Italic*this text is italicized* or
_this text is italicized_
this text is italicized
Bold and nested italic**this text is _extremely_ important**this text is extremely important
All bold and italic***all of this is important***all of this is important
Links[my text](https://www.google.com)my text
Lists (unordered)
- first item in list
- second item in a list
- third item in a list
  • first item in a list
  • second item in a list
  • third item in a list
Lists (ordered)
1. first item in a list
2. second item in a list
3. third item in a list
  1. first item in a list
  2. second item in a list
  3. third item in a list
Strikethrough~~this is strikethrough text~~this is strikethrough text
Headers (level 1)# Header 1Renders as a header. Note that all header levels are rendered at the same size.
Headers (level 2+)
## Header 2
### Header 3
etc.
Renders as a header. Note that all header levels are rendered at the same size.
In-line code`this is my code`this is my code
Block quote> this is a block quote
this is a block quote
Code blocks
```
this is a code block
```
this is a code block
Code blocks with syntax highlighting
```python
print("hello")
```
Renders as a code block with syntax highlighting for the specified language.
Dividers (horizontal rules)---Renders as a horizontal divider line.
Tables
| Col 1 | Col 2 |
| ----- | ----- |
| A      | B      |
Renders as a formatted table.
Task lists
- [ ] incomplete task
- [x] completed task
Renders as a task list with checkboxes.
Images![Logo](https://example.com/logo.png)This is translated as hyperlink text, i.e. Logo
Escaping special characters:
  • \ backslash
  • ` backtick
  • * asterisk
  • _ underscore
  • curly braces
  • [] square brackets
  • () parentheses
  • # hash mark
  • + plus sign
  • - minus sign (hypen)
  • . dot
  • ! exclamation mark
  • ampersand
  • \*This is special text\**This is special text*

    Usage info

    This block can be used with apps that use platform AI features when you expect a markdown response from an LLM that can get lost in translation rendering in Slack. Providing it in a markdown block leaves the translating to Slack to ensure your message appears as intended. Note that passing a single block may result in multiple blocks after translation.

    Examples

    An example of an markdown block

    {
    "blocks": [
    {
    "type": "markdown",
    "text": "**Lots of information here!!**"
    }
    ]
    }