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

Notifications

Announcements

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,690 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard