web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Exract data from email...
Power Automate
Unanswered

Exract data from email body and add to another email

(0) ShareShare
ReportReport
Posted on by 18

Hello, I'm trying to build a PA flow that will extract data from emails and deliver this data via email. My current solution looks something like this and uses index numbers to split data from specific lines.

 

jestit7993_0-1688565810787.png

 

This works fine with a single recipient, but the problem I run into is that if there are multiple recipients, additional lines are created which throws everything out of wack. The incoming mail uses a standard format (see attachment) which only deviates when additional recipients are added.

Does anyone know how I can create a flow that will specifically pull the data for Sender: , Subject: , and Recipients: so that they can be referenced in a compose email action?

SampleMail.png
Categories:
I have the same question (0)
  • Unknown geen idee Profile Picture
    1,757 on at

    Dear J,

     

    Reading your issue I have several questions/comments:

    1. What is exactly the difference in data when you have multiple recipients? Please show in example.
    2. Can you manipulate the syntax of the email/input data?
      1. If so, could you get rid of the email and just pull details directly from a form/table/database. This may solve your whole issue as you would be able to pull the data in a structured way.
      2.  If so, you could choose to create a message which is more easily 'read/split' by the flow. For example you could create a XML data ... or a complete JSON array ... or just add in some special characters to help with the split.
    3. Why would you split based on index? Why not split based on the default data labels you have in the email text message? You can split the email body for example on 'Sender:', 'Recipient:', etc. You can build an array with this for further processing. This would also seem to resolve your multiple recipient issue (depending on the what the output email is when you have multiple recipients.

     

    Hope the suggestions help,

    Happy flowing,

    Koen

     

     

     

  • jestit7993 Profile Picture
    18 on at

    Hi Koen,

     

    I'm newer to PA so I'm sure there are better ways to accomplish this, I'm open to any suggestions. I did some work on this last night and have a flow that more so accomplishes what I'm looking for.

    jestit7993_0-1688649254065.png

     

    This flow puts the HTML to text output into a string variable and uses a series of compose steps to find the needed data. An example of one of the expressions is below which grabs the subject line. 

     

    first(split(last(split(variables('varOutput'),'Subject:')),decodeUriComponent('%0A')))
     
    So far the flow has been able to extract the needed fields, regardless of how many recipients there are.
  • Unknown geen idee Profile Picture
    1,757 on at

    Great, there are only but a few flows in which finetuning of steps really makes sense performance wise ... otherwise 'If it works, it works'. And leave it at that.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 612

#2
Valantis Profile Picture

Valantis 344

#3
11manish Profile Picture

11manish 326

Last 30 days Overall leaderboard