web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : nioHOmDcMbamuP2XPP4Yng
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.

I have the same question (0)
  • 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 707 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 499 Moderator

#3
chiaraalina Profile Picture

chiaraalina 312

Last 30 days Overall leaderboard
Loading complete