cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amenegatti
New Member

Extract Reference number from Email Body

Hello, 

 

I am looking to remove a reference number that can appear anytime in the body of email as there is no template used by the sender. 

 

For example: 

 

Hello - Please find the reference number CF(9 digit number) if you need anything please let me know. 

 

So essentially I need a way to extract that reference number and the CF never changes as well 

1 REPLY 1
vikulkar
Community Support
Community Support

Hi @amenegatti ,

 

One way to achieve this is by using the substring function as shown below: 

substring(triggerOutputs()?['body/body'],indexOf(triggerOutputs()?['body/body'],'CF'),11)
This would extract all the text starting from CF and the 9 digits number.
 
If the referenceID includes '(' then you may want use the number 13 instead of 11 in the above expression
 
 
 
 
Thanks and Regards,
Vikas K
 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (4,137)