Telegram Bot channel Markdown support

The Telegram Bot channel supports basic Markdown-style formatting for messages. You can use Markdown to add bold text, italic text, inline links, and pre-formatted code to your messages. Telegram clients will render these formatting options accordingly.

Markdown syntax can be used in the text, title, or description fields of outbound text, choice, or card messages sent on the Telegram Bot channel.

For example, below is the JSON payload used to send a text message with text content containing Markdown tags using a Conversation API call:

Copy
Copied
{
  "app_id": "{{APP_ID}}",
  "recipient": {
    "contact_id": "{{CONTACT_ID}}"
  },
  "message": {
    "text_message": {
      "text": "*bold text*\n\n_italic text_\n\n[inline URL](http://www.example.com/)\n\n`inline fixed-width code`"
    }
  }
}

Markdown syntax on the Telegram Bot channel

Examples of the supported Markdown syntax options for the Telegram Bot channel are detailed below:

Plaintext Rendered text

*bold text*

bold text

_italic text_

italic text

[inline URL](https://developers.sinch.com)

inline URL

`inline fixed-width code`

inline fixed-width code

```
pre-formatted fixed-width code block
```

Copy
Copied
pre-formatted fixed-width code block

```python
pre-formatted fixed-width code block
written in the Python programming
language
```

Copy
Copied
pre-formatted fixed-width code block
written in the Python programming
language
Note:

The characters _ * ` [ can be used outside of a Markdown entity. However, you must escape them using two backslashes \\. Additionally, escaping inside Markdown entities is not allowed, so any Markdown entity must first be closed before and reopened after the escaped character(s).

We'd love to hear from you!
Rate this content:
Still have a question?
 
Ask the community.