Formatting Telegram messages

Using MarkdownV2 in Telegram Messages with Flows

 

Overview

MarkdownV2 is a formatting option supported by Telegram that allows you to add bold, italics, links, emojis, and structured text to your messages. When using Telegram within Flows, you can leverage MarkdownV2 to enhance the appearance of messages sent to users or groups.


Example MarkdownV2 Message in Flows

Here’s an example of how to format a message in Flows using dynamic variables from an incoming Telegram webhook:

Hi *{{message.from.first_name}}*,\n thank you for engaging in our *{{message.reply_to_message.forum_topic_created.name}}* topic in *{{message.chat.title}}* forum\\.\n If you require assistance, please contact us through our [help center](https://help.flows.world) for the quickest response πŸš€

MarkdownV2 Formatting Guide

FormatExampleRenders As
Bold*Bold Text*Bold Text
Italic_Italic Text_Italic Text
Code`Inline Code`Inline Code
Link[Clickable Text](https://example.com)Clickable Text
Line Breaks\n(New Line)
Escaping .\\..

Escaping Special Characters

MarkdownV2 requires special characters to be escaped:

Special Characters That Need Escaping:

* _ [ ] ( ) ~ > # + - = | { } . !

Example of Escaped Message in Flows:

"Hi *{{message.from.first_name}}*,\n Welcome to *our forum\\!* You can learn more in our [Help Center](https://support.spree.com/hc/en-us)\\.

Use \\ before any special character to prevent issues with MarkdownV2 rendering.


Final Tips


βœ… Escape special characters
βœ… Use \n for line breaks and \\* to escape * symbols as well as punctuation.
βœ… Test messages in a test Group in Telegram first

By following this guide, you can create beautifully formatted Telegram messages in Flows using MarkdownV2! πŸš€

Was this article helpful?