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 / Delimit text extracted...
Power Automate
Unanswered

Delimit text extracted from body of an email

(0) ShareShare
ReportReport
Posted on by

Good Day my friends,

I am testing the water with microsoft flows and I was able to extract text from my email, however I would like to delimit the text to be more acurate, I mean get the information per line without capturing information from other lines.

 

Example, I have the following lines of text in my email, I want to get the information per line, I did it using this structure "

substring(body('Html_to_text'),add(lastIndexOf(body('Html_to_text'),'VesselName'), 10),10) now the vessel name could be more longer or even more short, so in this case if the name is longer I want to get the complete name and if the name is short I want to get the name exactly as it is whitout adding information from the next line "Voyage            ISL8022" so if there a way to restrict this?
 

 

VesselName    AS Fiorella (AFI)

Voyage            ISL8022

Scenario          SHIFT

PortName         Port Everglades

 

Thank you in advance

Walter

Categories:
  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @walfredfu,

     

    Could you please share more details about your scenes?

    Could you please explain more details about your requeirment?

    What is the problem when you create the flow to acheive your needs?

     

    Please share more details so we would try to provide a proper workaround for you.

     

    Best regards,

    Alice

  • walfredfu Profile Picture
    on at

    Hello Alice,

    Thanks for your reply. Here is what I need.

    I want to extract the following  highlighted text from the body of my email by using microsoft flow:

     

    VesselName                      AS Fabrizia (AFA)

    Voyage                ISL8023

    PortName                          Castries, St Lucia

    EOSP                    2018-06-15 06:12:00

    PilotOnBoard                    2018-06-15 06:42:00

    BerthNo            

    ArrivedB            2018-06-15 07:18:00

    ETD                      2018-06-15 13:00:00

    NextPort            VISTT [1945] 2018-06-16 23:59

    MovesForDischarge        29

    MovesInTransit                 133

    NumberOfReefers           1

    DRAFTFWDINBERTH       5.3

    DRAFTAFTINBERTH         7.1

    DelayReason                    

    Remarks            

    ReportDate                        2018-06-15 08:15:00

     

    However the report is dinamyc and the fields that I am trying to get could be differents, in this case  "VesselName" AS Fabrizia (AFA) contain 17 characteres but there are some other vessels that contain 10 or 20 characteres. Now the problem is that sometimes the if the charactares contained are 10 or less the field si getting information from the next line... It is combining Vessel Name and Voyage.

     

     

    Part of email:

    VesselName         Regula             

    Voyage   CAR8023

    What I need is: Regula

     

    This is what I getting - Value extracted from my email: (Is pulling information from the next line " Voyage"

    Regula (REG)CAR

     

    This is the structure that i am using to the the information per each line.

    substring(body('Html_to_text'),add(lastIndexOf(body('Html_to_text'),'VesselName'), 10),17)
     
     
    Thanks
    Walter 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 315 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard