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

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
Super User III
Super User III

Hi @nrao 

 

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
Frequent Visitor

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.

Super User III
Super User III

Hi @nrao 

 

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
Frequent Visitor

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.

Super User III
Super User III

Hi @nrao 

 

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
Super User III
Super User III

Hi @nrao 

 

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (3,744)