cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
guyinkalamazoo
Helper III
Helper III

Parse email message

I have a project where part of the project is to parse emails that come in from an internet-facing form.  The emails that are coming in are textually the same (except for the responses) so there will be specific delimited strings. 

 

For the flow I start with the trigger (incoming email based on Subject), initialize a few variables, and then do HTML-to-text.  This is some output from that step with some information redacted:

 

 

First NameJoe Last NameSchmo Address316 Pierce AveCityAnywhere Zip
Code99999Phone Number999 99-9999Email Addressthisemail@outlook.comLocation of
PropertyHere and there

 

Every email will have the delimiters of 'First Name', 'Last Name', 'Address', 'City', 'Zip', 'Phone Number', 'Email Address', 'Location of Property'.  The data between these delimiters will be variable.  I understand using substrings in programming, getting the index of the first set of data (the easiest as in this case it would be 10)...but I am wondering if there is an easier way to extract this data from the email without having to write a substring parsing statement that is a mile long.

 

Thanks for any information.

1 ACCEPTED SOLUTION

Accepted Solutions
ScottShearer
Super User
Super User

@guyinkalamazoo 

Take a look at the split() expression.  It will be ugly, but using a series of split expressions might be the easiest way.  The delimiter in a split expression can be a series of characters - i.e. 'First Name', 'Zip', etc..

 

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

1 REPLY 1
ScottShearer
Super User
Super User

@guyinkalamazoo 

Take a look at the split() expression.  It will be ugly, but using a series of split expressions might be the easiest way.  The delimiter in a split expression can be a series of characters - i.e. 'First Name', 'Zip', etc..

 

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (2,472)