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

Using a flow to extract email body details

Greetings,

 

We have a similar situation to the ones I have read here but not exact. We are looking to parse the Subject and Body of an email and then create a SharePoint list from the retrieved contents.

 

The email in question is plain text, here is a snapshot of the email body:

 

2019-07-01_12-15-28.png

 

Thanks in advance!!!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Using a flow to extract email body details

@JHarlowe 

Hi there!  If you're looking to just have two fields, "Subject" and "Body", you should be ok.  But I suspect you want to get at the text within each of those and turn them into fielded data, no?

 

If that's the case, your emails will need to be consistent in format or context to most accurately parse the data out.  You can probably do most things with basic string manipulation and lengthy expressions, neither of which I am very good at, so I've built a few Flows using a third-party thing called Parserr.

 

It will let you build the parsing engine to separate the text within the body or subject, and grab attachments...very powerful and they offer some free plans.  There are others out there, but it depends on what is important for your scenario.

 

Keep us posted.

-Ed-

 

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Using a flow to extract email body details

Hi @JHarlowe, you can certainly get the subject and body of an email and create a Sharepoint list item via the "When a new email arrives" trigger, "Get items" action and a SharePoint "Create items" action". But there is no action to create a list. You might be able to achieve that via the Send an HTTP Request action but others will know more about that than me as I've never used it.

Rob
Los Gallardos

JHarlowe
Level: Powered On

Re: Using a flow to extract email body details

We do have a list created, apologies for the unclairity on that piece. We just be creating an item in the list with what we can capture.

Highlighted
Super User
Super User

Re: Using a flow to extract email body details

@JHarlowe 

Hi there!  If you're looking to just have two fields, "Subject" and "Body", you should be ok.  But I suspect you want to get at the text within each of those and turn them into fielded data, no?

 

If that's the case, your emails will need to be consistent in format or context to most accurately parse the data out.  You can probably do most things with basic string manipulation and lengthy expressions, neither of which I am very good at, so I've built a few Flows using a third-party thing called Parserr.

 

It will let you build the parsing engine to separate the text within the body or subject, and grab attachments...very powerful and they offer some free plans.  There are others out there, but it depends on what is important for your scenario.

 

Keep us posted.

-Ed-

 

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

Super User
Super User

Re: Using a flow to extract email body details

Hi @JHarlowe, you don't need a 3rd party product unless you are doing something seriously complicated with the body text, as @edgonzales  has indicated. Build the flow using the steps in the image below. You need the HTML to Text action otherwise you get a lot of html tags which you don't want.  In my example the body column is multiline.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

0-Flow.pngflow-1Email.pngemail1-Result.pngresult

 

 

JHarlowe
Level: Powered On

Re: Using a flow to extract email body details

Thank you @edgonzales & @RobElliott  for the quick feedback, this has indeed set me off in the right direction!! 

Helpful resources

Announcements
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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 (Last 30 Days)
Users online (4,553)