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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Formatted Slack messag...
Power Automate
Unanswered

Formatted Slack messages don't respect multiline

(0) ShareShare
ReportReport
Posted on 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.

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    on at

    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

  • aconnell Profile Picture
    8 on at

    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 at

    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 at

     

    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

  • aconnell Profile Picture
    8 on at

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

  • v-yamao-msft Profile Picture
    on at

    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 at

    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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard