cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pkiddle1973
Level: Powered On

Email Body text to table in excel help

Hi all,

 

I am new to Power Automate and need help, a solution to the issue that I have been presented to automate.

 

We receive emails from a static email address and there are parts of the email body that I want to grab and put into an Excel table.

 

Example email below:

 

Hi,

Attached is a CV application for the following vacancy:  Vacancy Link is here

Please reply ASAP to this submission.

First Name:
 John
Last Name: Smith
Email:  johnsmith@johnsmith.com
Phone: +44123456789
Preferred Sectors?: Sectors
Your Disciplines?: Discipline here
How did you find us?: Other
Vacancy Ref: 4321
Vacancy Link:  Link to advert here

 

The table I have in Excel has other cells where I input other data manually. But to make the process easier, it would be good to grab what we can from the email.

 

My question and where I am getting lost is how to build a flow, with the expressions needed to grab this information from the body of the email.

 

If anyone can help with building this, I can then look at how it's done, the flow itself and this way I learn better if that makes sense.

 

Thanks in advance.

 

Pete

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Email Body text to table in excel help

Hi @pkiddle1973 

 

Can you check and confirm if the format of the email is going to be exactly what you have posted in the query? If so, you can split the entire body on the enter key and then get individual line items and then keep adding the data to the excel row. It could look something like this: 

ffr4e.PNG

 Expression: split(outputs('Compose'),variables('enter'))

 

In the initialize variable ensure to hit an enter key in the value area

 

Once split on individual lines, you can access it as array elements.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

1 REPLY 1
Dual Super User
Dual Super User

Re: Email Body text to table in excel help

Hi @pkiddle1973 

 

Can you check and confirm if the format of the email is going to be exactly what you have posted in the query? If so, you can split the entire body on the enter key and then get individual line items and then keep adding the data to the excel row. It could look something like this: 

ffr4e.PNG

 Expression: split(outputs('Compose'),variables('enter'))

 

In the initialize variable ensure to hit an enter key in the value area

 

Once split on individual lines, you can access it as array elements.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,813)