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 / Grab text from email body
Power Automate
Unanswered

Grab text from email body

(0) ShareShare
ReportReport
Posted on by 2
Grabbing text from email body

Hi there:

My apologies up front because I am VERY new to flow and power automate. I am trying to create a flow that will take the VIN of a vehicle, the type of vehicle and name of dealership that I get in my emails and adding that information to my excel spreadsheet. I already have a spreadsheet that I have been using for a year now and just copy/paste the information from the emails into the spreadsheet. I would like to automate this task. All of the emails are the same format but different vehicle information and dealer information.

here's a sample: (the blue arrow points to the info I need to extract)

 


Al Serra Auto Plaza     ⬅️
Nathan Cottrill
(810) 845-4513
6061 S. Saginaw Street Suite A, Grand Blanc, MI, 48439
2019, Toyota, Camry, 4T1B11HK5KU203653, , ,  

        ⬆️                                    ⬆️

 

Here is what my excel spreadsheet looks like:

JohnShaw_0-1640835224675.jpeg

 

 

I love learning this kind of thing and would REALLY love some guidance.

Categories:
I have the same question (0)
  • AnthonyAmador Profile Picture
    2,553 Moderator on at

    Hi  @JohnShaw 

    This is what you could do. 

     

    First use the "When a new email arrives (V3)" trigger, you can filter the email by subject or specific sender to trigger the flow only with the email you want. 

    AnthonyAmador_0-1641249829372.png

    Then, initialize a string variable and just hit enter once on the value input. 

    AnthonyAmador_1-1641249932944.png

    Then, convert the body of the email to text using the "Html to text" action. 

    AnthonyAmador_2-1641250012842.png

     

    Next, using a "compose" action, (in my case named "Dealer" and "Car and Vin") enter the expressions below. 

    AnthonyAmador_3-1641250118104.png

    For Dealer

    split(body('Html_to_text'),variables('enter'))[0]

    For Car and Vin

    split(body('Html_to_text'),variables('enter'))[4] 

    What these expressions do is separate the text into lines, using the "enter" variable that we declared earlier and then you select the lines at the end with the "[]". 

     

    Now finally you have to use the action "Add a row into a table", enter the Dealer value, but you need to separate the string "Car and VIN" again, this is what you need to do. 

    AnthonyAmador_4-1641250436433.png

    In Dealer input just select the Output from Dealer compose. 

     

    But for Car input, you have to enter these expressions. 

    split(outputs('Car_and_VIN_'),',')[0]
    split(outputs('Car_and_VIN_'),',')[1]
    split(outputs('Car_and_VIN_'),',')[2] 

    And for VIN

    split(outputs('Car_and_VIN_'),',')[3] 

    It is the same logic that we used before, but now separating the value by commas. 

     

    I tried it and it worked, so it should work for you. 

     

    Hope this helps 

    Regards. 

    Community Support Team - Anthony Amador

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

     

  • JohnShaw Profile Picture
    2 on at

    Anthony,

    Thanks so much! I'll give this a try this weekend. 🙂

    John

     

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard