cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
walfredfu
Level: Powered On

Delimit text extracted from body of an email

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

2 REPLIES 2
Community Support Team
Community Support Team

Re: Delimit text extracted from body of an email

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
Level: Powered On

Re: Delimit text extracted from body of an email

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 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,960)