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 / 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:
I have the same question (0)
  • abc 123 Profile Picture
    784 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

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