Closed richielo closed 7 years ago
https://get.slack.help/hc/en-us/articles/202288908-Format-your-messages check out the text formatting from slack above
Thank you for your response. But it doesn't seem to cover how to do that for bot tho..newline didn't work when I use \n...
They included a link specifically for bot messages on that page, direct link here: https://api.slack.com/docs/message-formatting but what you should also double check is to make sure Watson is not removing them, in which case you would want to escape them using / character. You should call the Conversation API directly and see what you get back. That is exactly what is sent to slack, that should at least isolate where the problem is occuring, Watson side or Slack side.
Hey @richielo you need to escape your response to Slack. I think you already did because this is a very old issue. Feel free to open this if you were not able to fix it.
To include a new line in a response from WA in Slack, you'll need to include the newline character in the text response as defined in the JSON editor i.e. in the WA Dialog, open the JSON editor for the particular node and include the \n as shown in the example below
{
"output": {
"generic": [
{
"values": [
{
"text": "Hi there, how can I help today? :sunglasses: \nAlso saying Hi on a new line, just because I can :thumbsup:"
}
],
"response_type": "text",
"selection_policy": "sequential"
}
]
}
}
Is there a way to do formatting when I reply the message to slack? I just want to output a JSON array as a list. I tried things as simple as newline (\n, \n\n). But it doesn't seem to reflect on the slack side....
Thank you very much for your help.