Send Slack Message formatting is not applied to the message
Asked by Romans Averins:

Slack formatting does not work either from the \`Send Slack\` message input field or the \`Create Variable\` smart value field.

What I did:

1. Created \`Lookup Issues\` with JQL

2. Created \`Create variable\` and nested there {{#lookupIssues}} as listed below

* Variable name: bugIssues
* Smart value: {{#lookupIssues}} {{issueType.name}} - \<{{url}}\|{{key}}\> - {{summary}} {{/}}

3. Created \`Send Slack\` message and pasted there {{bugIssues}}

All works great but without any formatting like bullet points (\*) or newline \\n for slack whether it is injected into the Smart value of the variable or the Send slack message field.

Therefore, all issues are just dumped in one message without separation.

Please point me on how to inject at least \\n so each item from the \`Smart value\` of the {{#lookupIssues}} would be listed on a new line of the Slack message.

**Side note:** The current approach is used to have 2 types of Issues filtered and posted in one Slack message.

![Google Chrome_2022-05-26 23-29-27@2x.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/199404iD9FD5DE13CC37305/image-size/large?v=v2&px=999 "Google Chrome_2022-05-26 23-29-27@2x.jpg")

![Google Chrome_2022-05-26 23-14-25@2x.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/199402i7CF889F5AD67E285/image-size/large?v=v2&px=999 "Google Chrome_2022-05-26 23-14-25@2x.jpg")![Google Chrome_2022-05-26 23-26-29@2x.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/199403i89921E6E09E67FAE/image-size/large?v=v2&px=999 "Google Chrome_2022-05-26 23-26-29@2x.jpg")


Answers:
author: Mariette Conning
body: The following worked for me:

{{#lookupIssues}}? {{issueType.name}} - \<{{url}}\|{{key}}\> - {{summary}}  
{{/}}

Note the {{/}} is forced to be on a new line.


author: Daniel Eads
body: Hi [@Romans Averins](/t5/user/viewprofilepage/user-id/4583465) ,

The message created from Automation should follow Slack's [markdown formatting](https://api.slack.com/reference/surfaces/formatting#basics) - so to include a bullet point and newline in your message, this modification to your smart value should work:

```
{{#lookupIssues}}? {{issueType.name}} - <{{url}}|{{key}}> - {{summary}} \n{{/}}
```

Cheers,  
Daniel

comments: author: Romans Averins
body: Hey [@Daniel Eads](/t5/user/viewprofilepage/user-id/1527694) ,

Thank you for the response! This is exactly why the topic is raised as the \`\\n\` is not working in this case.

Tried it in various ways, even {{\\n}}, or {{/}} \\n, etc. but still slack is not recognizing it in the way it should.

Hence, copy-pasted the suggested solution and it just prints out all in one line with typed \\n in between.


author: Jose Braga Neto
body: Hi [@Romans Averins](/t5/user/viewprofilepage/user-id/4583465),  

Did you manage to sort that out? I'm having the same problem with the \\n


author: Romans Averins
body: [@Jose Braga Neto](/t5/user/viewprofilepage/user-id/5478259) this approach worked out.

------START OF MESSAGE------

{{#lookupIssues}}  
{{issueType.name}}

{{/}}

------END OF MESSAGE------


author: Jose Braga Neto
body: haha Legend, thanks!


Tags: format

slack