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 / Extracting data from B...
Power Automate
Unanswered

Extracting data from Body of Email

(0) ShareShare
ReportReport
Posted on by 41

Curious to know if this flow is possible

 

1.  Monitor shared mailbox for e-mail alerts (I know I can do this step)

2.  Extract the e-mail addressed referenced in the body of the e-mail alert

3.  Compose a new email to the e-mail addressed extracted from step 2

 

Any ideas on how to accomplish this?

 

Thanks in advance!

 

 

 

Categories:
I have the same question (0)
  • developingteal Profile Picture
    392 on at

    You definitely can do that - setup a cloud flow that checks for everytime an email comes in.  This will already grab the body of the email. You then need to do some text extraction with powerfx, or use one of the AI tools to find the emails. Then use a send email step. 

     

    Seems pretty simple to me, the difficult part will be extracting the email from the body. If the emails are pretty standard, you can just use a find() and look for where the email address is and then cut it out from the rest of the email text. Pretty much the sky is the limit on ways you can go to extract the email, I would pick whatever is comfortable and understandable to you or learn whatever you think is easiest.

     

    Let me know if you have any problems or questions!

  • strikeAlert Profile Picture
    41 on at

    Thank you!

    I'm not too familiar with PowerAutomate - i've created step 1 and confirmed it works (created an action that sends an email to xyz address when a new e-mail arrives to a shared mailbox)

     

    The part I am lost on is what you reference - maybe this will help - 

    1.  The email alerts are all standard - they are essentially Microsoft E-Mail alerts stating 'xyz@gmail.com' may be compromised

    2.  I want to grab that e-mail address and then e-mail the user a more 'friendly' email 'hey xyz, looks like something suspicious is going on with your account - please contact IT at xyz'

     

    I guess my question is - what 'action' do I create after the trigger? for step 2?  What would the next action be for step 3 to generate the e-mail and sent it?

  • developingteal Profile Picture
    392 on at

    You can use the encodian utility if you want, but it might make your flow a premium flow - I can't remember.

    developingteal_0-1717449272546.png

    If you take the body of the email into a compose you can then apply any powerfx functions to it you want. Then use find() to find the end of the email. Once you have the email as the result of the compose, plug the output into an email. 

    TLDR: compose body using find to get email, then send the email

  • strikeAlert Profile Picture
    41 on at

    @AlexEncodian - this utility worked great, however, i'm now stuck at the last step - which is to compose a new email with the result of what Encodian grabbed.

    When I tried using the 'Send an Email (V2)' action, I used 'result' in the To field from the Encodian action.  This produces an error.  I'm guessing because it is not grabbing the email address as plain text, but as HTML?


  • developingteal Profile Picture
    392 on at

    What you are saying seems exactly right to me. Or it is just not of the type text. Try using Text() in a compose with the result of the encodian action. Then put the output from that into the to field.

  • developingteal Profile Picture
    392 on at

    huh, I didn't know, thanks for sharing! I feel like it used to be or something...

  • strikeAlert Profile Picture
    41 on at

    That did the trick, thank you!!!

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 594

#2
Valantis Profile Picture

Valantis 469

#3
11manish Profile Picture

11manish 364

Last 30 days Overall leaderboard