Skip to main content

Notifications

Community site session details

Community site session details

Session Id : va6U2k/ezANQiunoAFpXD0
Power Automate - Building Flows
Unanswered

Formatted Slack messages don't respect multiline

Like (0) ShareShare
ReportReport
Posted on 13 Nov 2017 12:34:45 by 8

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.

  • aconnell Profile Picture
    8 on 30 Nov 2017 at 09:46:10
    Re: Formatted Slack messages don't respect multiline

    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.

  • v-yamao-msft Profile Picture
    on 30 Nov 2017 at 09:30:39
    Re: Formatted Slack messages don't respect multiline

    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

  • aconnell Profile Picture
    8 on 25 Nov 2017 at 10:37:39
    Re: Formatted Slack messages don't respect multiline

    Knock knock... I posted the image. Any insight as to the issue? 

  • aconnell Profile Picture
    8 on 15 Nov 2017 at 10:28:08
    Re: Formatted Slack messages don't respect multiline

     

    2017-11-15_05-25-28.png

    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:

     

    2017-11-15_05-31-17.png

  • v-yamao-msft Profile Picture
    on 15 Nov 2017 at 09:19:35
    Re: Formatted Slack messages don't respect multiline

    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

  • aconnell Profile Picture
    8 on 14 Nov 2017 at 10:56:51
    Re: Formatted Slack messages don't respect multiline

    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.

  • v-yamao-msft Profile Picture
    on 14 Nov 2017 at 02:41:19
    Re: Formatted Slack messages don't respect multiline

    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.
    3.PNG


    Have you tried this on your side?

     

    Best regards,
    Mabel Mao

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,089 Most Valuable Professional

Leaderboard