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 / Parse email - remove e...
Power Automate
Unanswered

Parse email - remove empty lines

(1) ShareShare
ReportReport
Posted on by 2
Good day, 
I have created a flow that takes an incoming email from a shared mailbox (v3) , converts html to test then parses each line and updates a SharePoint list with each of the parsed items. The flow works great. The challenge is we received an email with morning that then failed as there was a blank line in between the text. 
I have done some searching but can't find an easy way to remove or ignore blank lines between valid text. I know there is functions such as empty(), etc but I can't seem to incorporate them. 
 
 
I am sure there are better way to parse out each line of the email but this works for me
 
Firstline of email is: 
split(replace(outputs('Html_to_text')?['body'], decodeUriComponent('%0A'), '|'),'|')[0]
 
Pull just the first line of email after ":" is: 
split(outputs('FirstLineofEmail'),':')[1]
 
The flow will fail when it sees the black space as per this example. 
 
Thank you for any assistance. I really appreciate all the help I get from this forums. 
 
 
Categories:
  • abc 123 Profile Picture
    789 Moderator on at
    The split() function puts data into a table. So, I suppose you'd run it through a ForAll(), and if the Length() of the row is 0, then ignore it. All rows with data, write to another collection, and then use that collection to write to SharePoint.

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 445

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 300

Last 30 days Overall leaderboard