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 / 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

Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 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
    314 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

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard