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 / Using Power Automate T...
Power Automate
Unanswered

Using Power Automate To Parse Email and Extract Information From The Body

(0) ShareShare
ReportReport
Posted on by

I have a website that I collect details from and details are submitted via a form that lands into my mailbox. Here are the details: 

  • Question 1:
  • Other:
  • Ouestion 1 Details:
  • Question 1 Details 2:
  • First Name
  • Last Name
  • Address
  • Town / City
  • Country
  • Post Code
  • Telephone
  • Email
  • Type of Form

I want to be able to extract certain details from the body of the email. I attempted to do this with Power Automate but got an error after using this expression for example.

trim(first(split(last(split(body('Html_to_text'),'Question 1')),'Other')))

Not working for me. Any ideas?

Categories:
I have the same question (0)
  • Rhiassuring Profile Picture
    8,692 Moderator on at

    Hi there, 


    If it's coming in all bulleted or at least one different lines, I would split by NewLine to turn it into an array. 

     

    split(variables('txtEmail'), uriComponentToString('%0A'))
     
    If your form info ALWAYS comes in the same way, you should be able to know the # of each line - even use a list to put in the #, and the question title.
     
    This means that you can access any question from your form and then just get everything after the : in that line. 
     
    For example, if I want to get the Country, I'd always look at the output from my Compose (the split from above), and since it's #9, I'd just say 
    outputs('Compose_-_Split_Email_Lines')?[8]  (why is 8 and not 9? Because it starts at 0.) 
     
    Now, I have Country: Canada, and all I need to do is replace "Country:" with nothing, or, split on : and get the #1 element .. there's a few ways to go about it.
     
    Does that make sense? Would that work in your scenario, or are these going to differ?
     

     

     

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 636

#2
Valantis Profile Picture

Valantis 372

#3
11manish Profile Picture

11manish 335

Last 30 days Overall leaderboard