cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LCarpenter
Frequent Visitor

Converting Email Text to Excel Rows - How To Avoid Duplication?

Good afternoon,

 

I have a question about parsing text from emails and converting it to rows in an Excel spreadsheet, using Power Automate.

I know it's possible to create an automated flow to look for text inside of an email, and transfer it automatically to Excel. I've been following the instructions here, and they seem to work fine when each question to be extracted is different.

 

The problem is, if multiple sections have the same wording, how do I keep the flow from extracting text from the wrong section?

 

For example, here is a form I would like to convert:

 

example.png

 

As you can see, all three sections have the same verbiage (first name, last name, etc.).

If I want to extract the secondary address, or the address of the legal representative, into a different column, how do I keep it from filling the same one as 'primary address'?

1 ACCEPTED SOLUTION

Accepted Solutions
ScottShearer
Super User
Super User

@LCarpenter 

This will be ugly but you can get it done.

First split on this: 

image.png

Then use the Last() expression on the output of the split() - that will give you everying after the text that you split on.

Next, split the output of the last() expression on this:

image.png

Use the first() expression on the output - that will isolate all  the questions in section 1.

That should get you started...

 

 

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

2 REPLIES 2
ScottShearer
Super User
Super User

@LCarpenter 

This will be ugly but you can get it done.

First split on this: 

image.png

Then use the Last() expression on the output of the split() - that will give you everying after the text that you split on.

Next, split the output of the last() expression on this:

image.png

Use the first() expression on the output - that will isolate all  the questions in section 1.

That should get you started...

 

 

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

Scott
LCarpenter
Frequent Visitor

@ScottShearer 

Never mind, I found a tutorial! Thanks for the help.

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,503)