Creating a formatted message to send to Slack... all formatting it working just fine except for the newline character "\n" which is rendered in the message.
The newline character for multiline messages posted to slack should be respected.
Do you have another suggestion?
I'm trying to build a message from a collection of items and want each item on a separate line. Slack supports formatted messages with the newline character "/n" when passed by their API (ref: https://api.slack.com/docs/message-formatting#multiline_messages) but it doesn't appear that Flow is going to support this. Is that true? if so, any other options would be welcomed before I ditch Flow and go back to creating this simple process in Zapier.
Hi aconnell,
I saw that you are using join function in the Message Text field. Join function returns a string with each item of an array joined by a delimiter, so it will be considered as a whole and cannot be broken into multiple line.
Best regards,
Mabel Mao
Knock knock... I posted the image. Any insight as to the issue?
In the picture above, I am looping through a list, (#1) creating a slack formatted string and then (#2) adding that string to an array. Then, in #3, I am creating the Slack message. Notice I have a prefix that acts as a header, but it then uses a join() expression to join all Items in the array using the "\n" newline character.
The problem is the "\n" are being rendered like this... notice the "\n" right after the time & before the "-" in the middle of the string:
Hi aconnell,
I would like to know how is your flow created. Could you show me a screenshot of your flow?
I will help reproduce this issue on my side.
Best regards,
Mabel Mao
That works in the editor like you show, but when you are concatenating multiple strings together using the "join()" function from an array, that doesn't apply. You need to use the newline character.
Hi aconnell,
Could you show me how is the flow configured? I assume that you are entering the character “\n” in the Message Text field.
I did a simple test on my side, without using the special character, I just configured the message text in the following way, then the message posted on Slack will be multiline.
Have you tried this on your side?
Best regards,
Mabel Mao
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,089
Most Valuable Professional