<p>If you’re trying to just send a connector card w/ text in markdown, there’s no need to enclose the text in triple backticks (unless you specifically want preformatted text). We automatically treat the text in a connector card as markdown, unless you set the <code>markdown</code> property to false.</p>
<p>To add line break in markdown, end the line with 3 spaces + linebreak. For example:</p>
<pre><code class="lang-auto">msg.text("Line 1 \nLine 2")
</code></pre>
<p><strong>Connector cards sent by a bot:</strong></p>
<p>If you added those triple backticks to get preformatted text, then you need to place the backticks on their own lines to allow multiline text. For example:</p>
<pre><code class="lang-auto">msg.text("\nLine 1\nLine 2\n")
</code></pre>
<p><strong>Connector cards sent by a Connector:</strong></p>
<p>If you’re developing a connector or using the incoming webhook connector, that uses a different parser that doesn’t convert “```” markdown to a <code><pre></code> tag. It’s best to just fall back to HTML, as Bill suggested below. For example:</p>
<pre><code class="lang-auto">msg.text("<pre>Line 1\nLine 2</pre>")
</code></pre>
<p>HTML tags work inside a <code><pre></code> element, so as you found out, this is equivalent:</p>
<pre><code class="lang-auto">msg.text("<pre>Line 1<br>Line 2</pre>")
</code></pre>