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
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (3,842)