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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to combine multipl...
Power Automate
Unanswered

How to combine multiple lines into one sentence

(0) ShareShare
ReportReport
Posted on by

Hi community,

 

I'm trying to automate my business' collection of service requests to one excel spreadsheet. I've run into a road block trying to combine multiple lines into one sentence (See example). The request from our customers can sometimes be longer than one sentence as well. I'm only able to pull the first line, leaving the rest of the viable information still in the email.

 

Thanks for the help,

 

Marcus

PA problem 2.PNG
PA problem.PNG
PA problem 3.PNG
Categories:
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @ServiceatMadden 

     

    Give a try with this expression 

     

    sp

    join(split(outputs('Split_body_text'),decodeUriComponent('%0A')),' ')

     

    This would help you

    Mark it as solution if it resolves your query !

  • Cayshin Profile Picture
    338 on at

    In your third picture, you have the expression contact(outputs('Split_body_text')[82],'')) . That [82] is denoting to retrieve the 81st item (not 82nd, PA arrays start at 0) within the Split array. Since you are only indicating a single item and concat works by joining each item with whatever delimiter you set, you end up with...just that single item still.

     

    Since the trick will be determining when the text of the request actually ends, what I would suggest doing is identifying other unchanging delimiter points both above and below the text body you want to retrieve. You can then perform a series of splits: One to grab all the text after the top delimiter, then a second split to grab all the text above the second delimiter.

     

    For example, using your first picture, let's say our top delimiter is ">" and our bottom delimiter is "Details".

    We can start building an expression that looks like: Split(Last(Split(EMAILBODY, '>')), 'Details')[0]
    The green split will give us three sections, as noted by the pic below; the blue Last gets the last item (section) within the green split, which in this case is all the text from "Drains" onward; the pink Split is then splitting the blue section at the word "Details" and taking the first item of that array (so everything in before "Details").

    Cayshin_2-1680291056925.png

     

    You can then apply further Splits at linebreaks/New Lines to eliminate header/subject lines, and finally wrap it in a Concat(seriesOfSplitExpressions, ' ') to merge the request text body back together.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 335 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard