I'm trying to create Posts with botkit
using the Slack api, but I can't find any documentation on how to format a Post
file in Slack.
bot.api.files.upload({
content: "# Heading",
filename: "test.md",
filetype: "post",
channels: "random"
});
Markdown formatting doesn't work for this, is there any syntax to formatting Slack Posts?
Trying with HTML the response from the created file is like this:
<document><p><document><h1>H1<\/h1><p><\/p><h2>H2<\/h2><p><\/p><h3>H3<\/h3><p><\/p><p>Text <i>italic<\/i> <b>bold<\/b> <a href="<a href=\"http:\/\/www.slack.com%22%3Elink%3C\/a%3E\">http:\/\/www.slack.com">link<\/a><\/a> <u>underline<\/u><\/p><p><\/p><p><strike>strikethrough<\/strike><\/p><p><\/p><p><code>Code Block;<\/code><\/p><\/document><\/p><\/document>
so it's escaping html tags.