cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Extracting text from tables from body of email and add new row into Excel Spreadsheet

Hi,

 

As title says, I am trying to extract data from two tables sent in the body of an email and add as a row to excel spreadsheet.

 

I have currently used the steps

1) When a new email arrives

2) HTML to text (body)

3) Add a row to table (Excel)

 

When I receive the emails, the tables come in the following format - a table on top and a table at the bottom.

 

Report from 2020-06-15 00:00:00 to 2020-06-21 23:59:59

User IdLogin
1login email

 

Tasks

Item IdProject Id
110
211
312

 

I would like to insert a row into a spreadsheet each time I receive an email like this for each row in the 'Tasks' table but also append the user id and login data at the top table to each row in the bottom table.

 

Is it possible for me to do this? Thank you!!

6 REPLIES 6
abm
Super User
Super User

Hi @Anonymous 

 

This is going to be quite tricky to get the data especially you have two tables. You may need to use lots of split expression to get each rows delimited by carriage return. Then again how you going to get item id and project id? That's another challenge.  If you could get the data as comma separated that will be much easier to extract the data (Item id, project id, etc)

 

Thaks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Anonymous
Not applicable

Thank you! So you are saying it isn't possible to get the data below each column header in each table without a delimiter? Unfortunately, we can't get the data as comma separated, as these are automatically generated emails from within the organization.

Hi @Anonymous 

 

Thanks for your quick reply.

 

To get the data especially from a plain text you need some sort of rules or relations to find the data. Here all you have is a table. As I mentioned earlier you may need to use split expression to evaluate using the carriage return for each rows or you could try <tr> or <td> tags for using as a delimiter. You may end up doing lots of string manipulations to extract it. It may be possible but unfortunately there is is nothing out of the box from Power Automate to resolve it quickly.

 

Thanks 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Anonymous
Not applicable

Thank you for your quick reply! Do you have any sources I could look at? This is my first time using Microsoft Flow and am needed to automate and add these emails to a spreadsheet for internal purposes.

Hi @Anonymous 

 

I could do a screen share? Please check your email?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
abm
Super User
Super User

Hi @Anonymous 

 

Have a look at some examples of how to use Split expression? There are quite a lot of threads in this community related to this. The easiest way is a screen share to explain this. Have a look at the below posts.

 

https://faustocapellan.com/2018/05/01/express-yourself-string-functions-in-microsoft-flow/

 

https://www.youtube.com/watch?v=_M7Jpwlp4Go

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

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.

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!

Top Solution Authors
Users online (3,581)